How to set keys for ghostscript filters in the command-line interface?

2

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 \
 in.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).

Wrzlprmft

Posted 2013-03-02T17:15:26.293

Reputation: 2 673

You probably have to pass some PostScript to GhostScript, as the commandline parameters affect only the systemdict.

– Reinstate Monica - M. Schröder – 2013-03-05T17:01:18.293

No answers