Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Use Ghostscript for the pdftops filter by default as Poppler's pdftops does not support documents with pages of different sizes #3089
In the last days we have discussed and solved the problem of printing documents which contain pages of different sizes to a printer which has all the needed sizes supplied and having the printer printing each page on the correct paper size.
See the following bug:
It works correctly if CUPS 1.4 is built with a Ghostscript-based pdftops filter (HAVE_PDFTOPS not set). With pdftopdf based on Poppler's pdftops (HAVE_PDFTOPS set) all pages get scaled into the size of the first page of the document. This is a problem of Poppler:
The Poppler developers semm to do not intend to have this functionality in their pdftops tool. A Poppler developer tells in this bug report:
That's more a wish than a bug, in the sense that pdftops was never ment to output different page sizes per page :D (<- probably they mean "per document" here).
So CUPS 1.4 should default to use Ghostscript for doing the conversion from PDF to PostScript.
CUPS.org User: mike
Changing to feature feature for 1.4, as this is not a bug in CUPS.
Given that only the most recent version of Ghostscript even works as a PDF filter, I can't justify making Ghostscript the default. However, I can see changing the "--enable-pdftops" configure option to "--with-pdftops=foo" where "foo" is pdftops, gs, or none. The default will be the same (use pdftops if present) and you can override it with a configure option.
CUPS.org User: till.kamppeter
The best would be to check the version of Ghostscript. If it is 8.64 or newer it should be used by default, otherwise Poppler's pdftops. The possibility to choose manually one of the two by a ./configure option should be always there.
CUPS.org User: mike
Checking the version number output of Ghostscript is non-trivial, since we'd need to convert from floating point to integer to do any comparisons.
The default will still be pdftops, and any Linux distros will need to decide whether they want to use pdftops or gs...
--- config-scripts/cups-pdf.m4 (revision 8329)
-AC_ARG_ENABLE(pdftops, [ --enable-pdftops build pdftops filter, default=auto ])
-if test "x$enable_pdftops" != xno; then