-
Notifications
You must be signed in to change notification settings - Fork 74
Description
TL;DR Please install pdfsizeopt by following the installation instructions on https://github.com/pts/pdfsizeopt . By doing so, pdfsizeopt will use Ghostscript 9.05 bundled with it, and it will work.
Currently pdfsizeopt uses Ghostscript for various steps (see #63 for details). Because of feature removals and changes in newer versions of Ghostscript, only older versions of Ghostscript work with pdfsizeopt. Thus upgrading Ghostscript (as used by pdfsizeopt) would break the optimization of some PDFs. It's impossible to fix this (quickly) within pdfsizeopt, because some features used by pdfsizeopt have been removed from newer Ghostscript versions.
This shouldn't be a problem for most users, because pdfsizeopt, when installed as described at https://github.com/pts/pdfsizeopt, contains an instance of (older) Ghostscript which is fully compatible with pdfsizeopt.
Most of the problematic Ghostscript features are used by font optimization, which can be disabled by using pdfsizeopt --do-optimize-fonts=no. This will make pdfsizeopt succeed, but it will keep the output PDF larger than necessary (because font opitimization steps are skipped).
More details about individual Ghostscript versions:
- Ghostscript 8.50: supposed to work
- Ghostscript 8.70: works according to Ghostscript 9.50 compatibility: warning about the .setpdfwrite operator #134
- Ghostscript 9.05: works, following the official installation instructions at https://github.com/pts/pdfsizeopt the user will get a copy of Ghostscript 9.05, and pdfsizeopt will use that instead of the system Ghostscript (e.g. /usr/bin/gs or /usr/local/bin/gs).
- Ghostscript 9.10: works, some versions of pdfsizeopt had a copy of this version included
- Ghostscript 9.14.1: works, see run on M1 Apple Silicon Mac within Docker #154 (comment)
- Ghostscript 9.22: Type1CParser may fail, e.g. Ghostscript 9.22 compatibility: Type1CParser failure #113
- Ghostscript 9.25: Type1CParser may fail, e.g. Ghostscript 9.25 compatibility: "Error: /invalidaccess in --forall--" in Type1CParser #97 and Ghostscript 9.25 compatibility: (Type1CParser) duplicate #108 and Ghostscript 9.25 compatibility: Type1CParser failure #100
- Ghostscript 9.50: Type1CConverter may display a warning, e.g. Ghostscript 9.50 compatibility: warning about the .setpdfwrite operator #134
- Ghostscript 9.53: Type1CConverter may fail, e.g. Ghostscript 9.53 compatibility: Type1CConverter fails #144
- Ghostscript 9.54: Type1CConverter may fail, e.g. Ghostscript 9.54 compatibility: Error: /undefined in .setpdfwrite #152