ImageMagick, convert , ...
, , PDF ? ( ) Ghostscript inkcov ( Ghostscript v9.05 ). CMYK ( RGB, CMYK ).
PDF Ghostscript:
gs \
-o test.pdf \
-sDEVICE=pdfwrite \
-g5950x2105 \
-c "/F1 {100 100 moveto /Helvetica findfont 42 scalefont setfont} def" \
-c "F1 (100% 'pure' black) show showpage" \
-c "F1 .5 .5 .5 setrgbcolor (50% 'rich' rgbgray) show showpage" \
-c "F1 .5 .5 .5 0 setcmykcolor (50% 'rich' cmykgray) show showpage" \
-c "F1 .5 setgray (50% 'pure' gray) show showpage"
, - , 2 3 .
:
gs -o - -sDEVICE=inkcov test.pdf
[...]
Page 1
0.00000 0.00000 0.00000 0.02230 CMYK OK
Page 2
0.02360 0.02360 0.02360 0.02360 CMYK OK
Page 3
0.02525 0.02525 0.02525 0.00000 CMYK OK
Page 4
0.00000 0.00000 0.00000 0.01982 CMYK OK
( 1.00000 100% . , 0.02230 , 2.23 % .) , Ghostscript inkcov :
- 1 + 4 C (), M (), Y (), K ().
- 2 + 3 C (), M (), Y (), K () .
PDF, DeviceGray:
gs \
-o temp.pdf \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray \
-sProcessColorModel=DeviceGray \
test.pdf
... :
gs -q -o - -sDEVICE=inkcov temp.pdf
0.00000 0.00000 0.00000 0.02230 CMYK OK
0.00000 0.00000 0.00000 0.02360 CMYK OK
0.00000 0.00000 0.00000 0.02525 CMYK OK
0.00000 0.00000 0.00000 0.01982 CMYK OK
, ! (BTW, convert 2 , [] test.pdf, [ ] temp.pdf - ...)