Tuesday, June 18, 2019

QuickTip: Linux Convert Color PDF to GrayScale

Using GhostScript (source). The first line sets name of output file ("output.pdf" here)

gs \
 -sOutputFile=output.pdf \
 -sDEVICE=pdfwrite \
 -sColorConversionStrategy=Gray \
 -dProcessColorModel=/DeviceGray \
 -dCompatibilityLevel=1.4 \
 -dNOPAUSE \
 -dBATCH \
 input.pdf

No comments: