I am having much trouble to get ImageMagick\'s identify
to, well, identify a PDF as CMYK.
Essentially, let\'s say I\'m building this file, test.t
sdaau, the command you used for trying to convert your PDF to CMYK was not correct. Try this one instead:
gs \
-o test-cmyk.pdf \
-sDEVICE=pdfwrite \
-sProcessColorModel=DeviceCMYK \
-sColorConversionStrategy=CMYK \
-sColorConversionStrategyForImages=CMYK \
test.pdf
If color conversion does not work as desired and if you see a message like "Unable to convert color space to Gray, reverting strategy to LeaveColorUnchanged" then...
In this case add -dOverrideICC
to the command line and see if it changes the result as desired.
To avoid JPEG artifacts appearing in the images (where there were none before), add:
-dEncodeColorImages=false
into the command line.
(This is true for almost all GS PDF->PDF processing, not just for this case. Because GS by default creates a completely new file with newly constructed objects and a new file structure when asked to produce PDF output -- it doesn't simply re-use the previous objects, as a more "dumb" PDF processor like pdftk
does {pdftk
has other advantages though, don't misunderstand my statement!}. GS applies JPEG compression by default -- look at the current Ps2pdf documentation and search for "ColorImageFilter" to learn about more details...)