Converting PDF to CMYK (with identify recognizing CMYK)

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 

Update

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…

  1. your Ghostscript probably is a newer release from the 9.x version series, and
  2. your source PDF likely uses an embedded ICC color profile

In this case add -dOverrideICC to the command line and see if it changes the result as desired.


Update 2

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…)

Leave a Comment