Scribusoid

Author Topic: [SOLVED] PDF/X-1a exports with sRGB colorspace instead of CMYK  (Read 445 times)

rocketraman

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
[SOLVED] PDF/X-1a exports with sRGB colorspace instead of CMYK
« on: September 28, 2017, 08:00:15 pm »
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).
« Last Edit: October 03, 2017, 10:41:47 am by rocketraman »

jghali

  • Scribus Team Member
  • Administrator
  • Newbie
  • *****
  • Posts: 10
  • Karma: 1
Re: PDF/X-1a exports with sRGB colorspace instead of CMYK
« Reply #1 on: October 02, 2017, 02: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.

radu81

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
  • Scribus User
Re: PDF/X-1a exports with sRGB colorspace instead of CMYK
« Reply #2 on: October 02, 2017, 11: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?
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

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
[SOLVED] Re: PDF/X-1a exports with sRGB colorspace instead of CMYK
« Reply #3 on: October 03, 2017, 10:18:51 am »
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
« Last Edit: October 03, 2017, 10:40:34 am by rocketraman »

jghali

  • Scribus Team Member
  • Administrator
  • Newbie
  • *****
  • Posts: 10
  • Karma: 1
Re: PDF/X-1a exports with sRGB colorspace instead of CMYK
« Reply #4 on: October 03, 2017, 02:48:17 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

  • Full Member
  • ***
  • Posts: 143
  • Karma: 1
  • Scribus User
Re: [SOLVED] PDF/X-1a exports with sRGB colorspace instead of CMYK
« Reply #5 on: October 04, 2017, 01:28:00 am »
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