ghostscript - How to programmatically convert a PDF to grayscale using only black ink? -


i'm trying using ghostscript:

gs -soutputfile=gray.pdf           \    -sdevice=pdfwrite               \    -scolorconversionstrategy=gray  \    -dprocesscolormodel=/devicegray \    -dnopause -dbatch               \    -dautorotatepages=/none         \     color.pdf 

but doesn't result in using black ink:

gs -q  -o - -sdevice=inkcov gray.pdf   0.15365  0.15365  0.15365  0.09419 cmyk ok 

i can make conversion using adobe products i'd able in more automatable fashion.

this (mostly) due way inkcov works.

your pdf file contains transparency group devicergb blending space. note not create rgb output, merely means objects blended must done in rgb space. not in devicergb (eg objects in gray) must first converted rgb, blended, converted device space rendering.

because inkcov cmyk device, means blended rgb objects must converted cmyk. results in less perfect black. pdf file not in fact contain except gray colour specifications except specifying blending space of transparency rgb.

looking @ acrobat appears do, seems simple solution 1 go for, change transparency blending space devicegray well. know previous experience blending in different spaces result in differences in rendering. on other hand, changing colour space of colour specifications......

given time more investigation i'll go down ths road in next release.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -