Converting PDF without any images to CMYK

天涯浪子 提交于 2019-11-29 17:58:26

If you are using an up to date version of Ghostscript, then you do not need either -sColorConversionStrategyForImages (incidentally that's not a real Ghostscript control) nor -sProcessColorModel. If you are not using an up to date version of Ghostscript, then update....

Other than that, since you haven't provided an example, or told us which version of GS you are using, or on which platform, its not really possible to say anything further.

[added after file provided]

Your original PDF file contains this as the content stream for the page:

stream
q
0 0 0 rg /a0 gs
109.715 637.714 262.855 -260.57 re f
Q
endstream

So that saves the graphcis state, sets the colour to 0,0,0 RGB, sets up a particular graphics state where the alpha is 1, draws a rectangle, and fills it with the current colour then restores the graphics state.

I then used this command line:

./gs -sDEVICE=pdfwrite -sOutputFile=CMYK.pdf -sColorConversionStrategy=CMYK test.pdf

The resulting PDF file has this as the page content stream:

stream
q 0.1 0 0 0.1 0 0 cm
/R7 gs
0.722 0.675 0.671 0.882 k
1097.15 3771.44 2628.55 2605.7 re
f
Q
endstream

So that saves the graphics state, multiples the CTM by 0.1 in x and y, sets a specific graphics state, sets the colour to 0.722, 0.675, 0.671, 0.882 CMYK, creates a rectangle, fills it with the current colour and the restores the graphics state.

So the resulting PDF file has all the colours defined as CMYK values.

Perhaps your problem is with identify not Ghostscript.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!