views:

31

answers:

1

Hi,

I'm searching for a linux command-line utility/script capable of removing colors in a PDF. The output of the utility should be the same PDF, but in grayscale.

Does anyone know how to do this?

Thanks

A: 

You can use Ghostscript:

gswin32c ^
  -o grayscale.pdf ^
  -sDEVICE=pdfwrite ^
  -sColorConversionStrategy=Gray ^
  -sProcessColorModel=/DeviceGray ^
  -dCompatibilityLevel=1.4 ^
   c:/path/to/input.pdf 

(example is for Windows; on Linux use gs instead of gswin32c.exe and \ as a line continuation mark instead of ^).

pipitas
Works great, again, thanks for your answer.
plang
@Phillipe Lang: Can you please (a) upvote, and (b) accept this answer then?
pipitas