Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I set keys of Ghostscript filters (as documented here) in the command-line interface?

More precisely, I would like to set the Predictor option of the PNGPredictorEncode filter in the following script:

gs \
 -sDEVICE=pdfwrite \
 -dGrayImageFilter=/PNGPredictorEncode \
 -sOutputFile=out.pdf \

I have tried to guess the syntax for this and found some ways which do not raise a syntax error (e.g., adding -dPredictor=10 as an option). However, none of these ways seemed to have any effect (the respective out.pdfs were identical to the pixel).

share|improve this question
You probably have to pass some PostScript to GhostScript, as the commandline parameters affect only the systemdict. – Martin Schröder Mar 5 '13 at 17:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.