[SOLVED] PDF/X-1a exports with sRGB colorspace instead of CMYK

Previous topic - Next topic

rocketraman

I am exporting a PDF/X-1a file from Scribus 1.4.6 on Fedora 26.

I have converted all the colors in the image to CMYK, and have selected the profile my printer requires (CoatedGracol2006). When I export to PDF, the colorspace in the output is always sRGB (verified by using the ImageMagic `identify` command).

Oddly, if I use the Pre-Press option to add Crop Marks, Bleed Marks, or Registration Marks, then the output PDF is in the CMYK color space. However, my printer does not want these marks. How can I output CMYK without the marks?

I have attached the file using the Collect option (update: collect did not work, the file sizes are too large -- I attached the scribus file and we can go from there if other stuff is needed).

[attachment deleted by admin]

jghali

ImageMagic identify command is not reliable for PDFs. One of the basic reason for that is that each object in a PDF can have a different colorspace. So a PDF does not have a colorspace by itself.

radu81

Probably I am a little bit off-topic, but is there a way in Linux to see if a pdf has mixed objects with different colours?
I try to explain better, at work when I export in pdf from ID or AI, I use to open the pdf file with Acrobat and do a preflight and check if there are any RGB objects left into pdf. I didn't find a way to do a similar job with linux, so I copied my pdf file to an USB stick and tested at work with Acrobat. There were no RGB or other colours different into the pdf file, everything seems fine, but like I said I would like to do this tests at home under Linux if possible.

Thank you in advance
sorry for my bad english

rocketraman

Quote from: jghali on October 02, 2017, 01:49:30 PM
ImageMagic identify command is not reliable for PDFs. One of the basic reason for that is that each object in a PDF can have a different colorspace. So a PDF does not have a colorspace by itself.

Ok, this makes sense.

I've extracted the primary content stream out of my PDF using this command:

$ qpdf --show-pages mypdf.pdf
page 1: 11 0 R
  content:
    10 0 R

$ qpdf --show-object=10 --filtered-stream-data mypdf.pdf > stream.data


This seems to correctly decompress object 10 and write it to a file. The result is simple ASCII text, that seems to be a PDF Graphics definition (cheat sheet @ https://github.com/gendx/pdf-cheat-sheets/blob/master/pdf-graphics.clean.pdf).

Using the cheat sheet above, and realizing the format uses postfix notation, I can see several lines with color information ending with "k", indicating CMYK. For example:

0.65490 0.00000 0.30980 0.00000 k

Also, I see no lines ending with "rg" indicating an RGB color.

Therefore, all good!

Thanks,
Raman

jghali

Quote from: radu81 on October 02, 2017, 10:46:14 PM
Probably I am a little bit off-topic, but is there a way in Linux to see if a pdf has mixed objects with different colours?
Thank you in advance

I don't know many free solutions on Linux and the solution I know is rather for PDF specialists: Podofobrowser is a PDF object and streams viewer based on PoDoFo library. You'll likely have to compile it by yourself, its sources can be downloaded from sourceforge: https://sourceforge.net/projects/podofo/files/podofobrowser/. Even if it's not quite maintained anymore, it's still a useful tool I regularly use for PDF files debugging.

mnawij

https://www.qoppa.com/pdfstudio/

It is not free option, but it is a pdf editor for linux.  I will have to ask my friend to see if you can use it to identify colorspaces of images.

mnawij