I scanned a document in color to PDF, and I don't want to re-scan it. How can I convert this PDF document to grayscale (preferably without loss of other information)? My usual toolset of doPDF, pdfsam and the Neevia online converter don't work here. I was thinking I could simply print to PDF and select the Grayscale color option, but doPDF doesn't have that option. I'm using Windows, but I can probably handle a solution for any OS.
asked Aug 3, 2011 at 16:54 3,551 11 11 gold badges 49 49 silver badges 65 65 bronze badgesI found a solution in a blog post:
With GhostScript (and Windows users can access gs via cygwin), you can do it with the following command:
gs \ -o grayscale.pdf \ -sDEVICE=pdfwrite \ -sColorConversionStrategy=Gray \ -dProcessColorModel=/DeviceGray \ -dCompatibilityLevel=1.4 \ source.pdf
This will convert source.pdf to grayscale.pdf and not put you into a GhostScript shell (due to the -o option instead of the -sOutputFile= option).
answered Aug 4, 2011 at 16:47 3,551 11 11 gold badges 49 49 silver badges 65 65 bronze badgesOMG!, what a complicated workaround for avoiding the Ghostscript command prompt to stay up after the processing! A more simple solution is to add -dNOPAUSE -dBATCH to the commandline. The -dNOPAUSE part spares you from hitting [return] after each page, and the -dBATCH part saves you from typing 'quit' at to exit the GS> prompt. And even shorter: just use -o grayscale.pdf for specifying the output file; this -o . implicitly also sets -dBATCH -dNOPAUSE .
Commented Aug 8, 2011 at 20:14It appears this no longer works with recent versions of Ghostscript: ghostscript.com/pipermail/gs-bugs/2012-May/025904.html says "'Gray' is not a documented legal value for ColorConversionStrategy"