Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdftops does not support multi-page-size documents or page size determined by document #3063

Closed
michaelrsweet opened this Issue Jan 16, 2009 · 2 comments

Comments

Projects
None yet
1 participant
@michaelrsweet
Copy link
Collaborator

michaelrsweet commented Jan 16, 2009

Version: 1.4-current
CUPS.org User: till.kamppeter

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.

Example:

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

lpr A3landscape.pdf

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

pdftops -level3

(simply not specifying paper size) I get correct PostScript output.

Original bug report which made me posting this:

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/310575

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

michaelrsweet commented Jan 16, 2009

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

http://bugs.ghostscript.com/show_bug.cgi?id=690236

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

michaelrsweet commented Jan 23, 2009

CUPS.org User: mike

This is fixed by the changes for STR #3062.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.