Option cmyk for xcolor package does not produce a CMYK PDF

There's not really such a thing as a 'CMYK PDF' or an 'RGB PDF'. PDFs can contain objects coloured in RGB and CMYK (and many other) colour spaces. See my answer here for some details. So your statement "Surely the PDF uses only one of CMYK or RGB for colour." is wrong, and it's unclear to me on what basis "identify -verbose" is deciding that it is RGB. Maybe the colorspace just defaults to RGB, even for formats where that doesn't make sense?

As for your question: "How can I reliably tell which?", in addition to @Herbert's suggestion to look at the uncompressed PDF stream (if that means anything to you) you can use Adobe Acrobat Professional has various tools to see which colour spaces are being used and where. An "Output preview" tool; a "Preflight" tool; a "convert colors" tool; etc.


With using \pdfcompresslevel=0 for PDFTeX or with \pdfvariable compresslevel for LuaTeX I'll get the pdf with no compressed streams and can see what happens inside the pdf.

With the cmyk option I get:

stream
0 0 0 1 k 0 0 0 1 K
0 g 0 G
0 0 0 1 k 0 0 0 1 K
1 1 0 0 k 1 1 0 0 K
BT
/F15 24.7871 Tf 91.925 752.955 Td [(A)]TJ
0 0 0 1 k 0 0 0 1 K
0 0 0 1 k 0 0 0 1 K
0 0 0 1 k 0 0 0 1 K
ET
endstream

and with the rgb option:

stream
0 0 0 rg 0 0 0 RG
0 g 0 G
0 0 0 rg 0 0 0 RG
0 0 1 rg 0 0 1 RG
BT
/F15 24.7871 Tf 91.925 752.955 Td [(A)]TJ
0 0 0 rg 0 0 0 RG
0 0 0 rg 0 0 0 RG
0 0 0 rg 0 0 0 RG
ET
endstream

which is what I would expect, a correct color setting. But printing a RGB color is not the same as printing a CMYK color ...


I add the same problem with a LaTeX file.

I wanted to obtain a cmyk PDF file by using \includepackage[cmyk]{xcolor} but my document was in RGB.

So, since I insert a picture in CMYK color format, the PDF file is in CMYK.

I think if you use coloration for your text, you must add the cmyk option.

For example \definecolor{red}{rgb}{This is text RGB}

For example \definecolor{red}{cmyk}{This is text CMYK}

CMYK does not run if you don't use it.

If all you document is in RGB, your PDF file will be in RGB.

If you insert one mention of cmyk in your code, like in the example, your PDF file will be in CMYK.

Good luck.

Tags:

Pdf

Color