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
pdftops does not support multi-page-size documents or page size determined by document #3063
If I send a PDF document with a non-default paper size without manually selecting the needed size to a printer which provides the document's paper size, the printer uses the default paper size.
I have a PostScript printer with both A3 and A4 available in its two trays. The default size in the CUPS queue is A4 and the default tray is set to automatic selection.
If I do
I get an A4 sheet with the left half of the A3 (landscape) document.
I expect an A3 sheet being pulled from the second tray and the full page printed.
I am required to enter
lpr -o PageSize=A3 A3landscape.pdf
to achieve this.
If I have a document with multiple different page sizes, like first page A4, second A3, third A4, I cannot print it at all with CUPS.
I think the problem is the pdftops filter which generates the following command line on the first example:
pdftops -level3 -paperh 842 -paperw 595
which gives a crippled (left half on A4) PostScript output file.
If I use the command line
(simply not specifying paper size) I get correct PostScript output.
Original bug report which made me posting this:
CUPS.org User: till.kamppeter
If I compile the pdftops of CUPS 1.4 in Ghostscript mode I get
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout -dLanguageLevel=3 -g595x842 -c 'save pop' -f
(still affected by STR #3062), but the corrected Ghostscript command line
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout -dLanguageLevel=3 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -c 'save pop' -f
leads to the same problem. One would need to leave out the page size specification here, too
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout -dLanguageLevel=3 -c 'save pop' -f
but this also does not work due to the following Ghostscript bug