What should the "landscape" and "orientation-requested" options exactly do?
Hi,
I got the following bug report on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/1243484
a user complais that when he sends a job with the "landscape" option it does not come out correctly.
Now I want to know exactly what "landscape" and "orientation-requested" should do exactly, to fix cups-filters.
There is some discussion in the bug report and following RFC 2911 I come to the conclusion that PDF files and also PostScript files which come from apps as a print job have their layout and page geometry already determined by the app and so a filter like pdftopdf should ignore "landscape" and "orientation-requested". For PostScript files (filters pstopdf and pstops) the given "PageSize", "landscape", and "orientation-requested" settings should only be used as default for pages without geometry definition (like the old PostScript CUPS test page) and be ignored by pages which already come with complete geometry info (like pages of a usual print job from an app). Filters for text and image jobs (texttopdf, imagetopdf) should use "landscape" and "orientation-requested" for the layout of the output.
Am I correct?
Till
Am 05.12.2013 23:44 schrieb "Till Kamppeter" <[email protected]>:
Quoted 26 lines
Hi,
I got the following bug report on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/1243484
a user complais that when he sends a job with the "landscape" option it does not come out correctly.
Now I want to know exactly what "landscape" and "orientation-requested" should do exactly, to fix cups-filters.
There is some discussion in the bug report and following RFC 2911 I come to the conclusion that PDF files and also PostScript files which come from apps as a print job have their layout and page geometry already determined by the app and so a filter like pdftopdf should ignore "landscape" and "orientation-requested". For PostScript files (filters pstopdf and pstops) the given "PageSize", "landscape", and "orientation-requested" settings should only be used as default for pages without geometry definition (like the old PostScript CUPS test page) and be ignored by pages which already come with complete geometry info (like pages of a usual print job from an app). Filters for text and image jobs (texttopdf, imagetopdf) should use "landscape" and "orientation-requested" for the layout of the output.
Quoted 1 line
Am I correct?
I don't think so.
E.g. for N-up, fitplot, adding of borders the pdftopdf filter looks at the final destination size. This size is determined by page-size, *together* with orientation-requested. pdftopdf also makes sure that filters like pdftoXYZ only get portrait pdfs as input, so that these can rasterize from to bottom and get the correct raster pixel ordering without thinking about rotations (e.g. an inkjet still prints along the short edge, regardless whether the input is landscape or not).
Two examples with texttopdf:
1) A4, portrait: output pdf has (roughly) 21x29 cm, pdftopdf keeps it, pdftoijs renders (e.g.) 1000x1400 pixel output "image" for the printer.
2) A4, landscape: output pdf has 29x21 cm, pdftopdf rotates it (in the ppd-specified normal_landscape direction), pdftoijs renders 1000x1400 pixels.
Tobias
Till,
What Tobias said...
Quoted 30 lines · Tobias Hoffmann
Am 05.12.2013 23:44 schrieb "Till Kamppeter" <[email protected]>:
Quoted 26 lines
Hi,
I got the following bug report on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/1243484
a user complais that when he sends a job with the "landscape" option it does not come out correctly.
Now I want to know exactly what "landscape" and "orientation-requested" should do exactly, to fix cups-filters.
There is some discussion in the bug report and following RFC 2911 I come to the conclusion that PDF files and also PostScript files which come from apps as a print job have their layout and page geometry already determined by the app and so a filter like pdftopdf should ignore "landscape" and "orientation-requested". For PostScript files (filters pstopdf and pstops) the given "PageSize", "landscape", and "orientation-requested" settings should only be used as default for pages without geometry definition (like the old PostScript CUPS test page) and be ignored by pages which already come with complete geometry info (like pages of a usual print job from an app). Filters for text and image jobs (texttopdf, imagetopdf) should use "landscape" and "orientation-requested" for the layout of the output.
Quoted 1 line
Am I correct?
Quoted 9 lines
I don't think so.
E.g. for N-up, fitplot, adding of borders the pdftopdf filter looks at the final destination size. This size is determined by page-size, *together* with orientation-requested. pdftopdf also makes sure that filters like pdftoXYZ only get portrait pdfs as input, so that these can rasterize from to bottom and get the correct raster pixel ordering without thinking about rotations (e.g. an inkjet still prints along the short edge, regardless whether the input is landscape or not).Two examples with texttopdf:
1) A4, portrait: output pdf has (roughly) 21x29 cm, pdftopdf keeps it, pdftoijs renders (e.g.) 1000x1400 pixel output "image" for the printer.
2) A4, landscape: output pdf has 29x21 cm, pdftopdf rotates it (in the ppd-specifiednormal_landscapedirection), pdftoijs renders 1000x1400 pixels.Tobias
_______________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Quoted 9 lines · Tobias Hoffmann
I don't think so.
E.g. for N-up, fitplot, adding of borders the pdftopdf filter looks at the final destination size. This size is determined by page-size, *together* with orientation-requested. pdftopdf also makes sure that filters like pdftoXYZ only get portrait pdfs as input, so that these can rasterize from to bottom and get the correct raster pixel ordering without thinking about rotations (e.g. an inkjet still prints along the short edge, regardless whether the input is landscape or not).
Quoted 9 lines
Two examples with texttopdf:
1) A4, portrait: output pdf has (roughly) 21x29 cm, pdftopdf keeps it, pdftoijs renders (e.g.) 1000x1400 pixel output "image" for the printer.
2) A4, landscape: output pdf has 29x21 cm, pdftopdf rotates it (in the ppd-specifiednormal_landscapedirection), pdftoijs renders 1000x1400 pixels.Tobias
Thank you very much for your help. So now the handling of "landscape" and "orientation-requested" in cups-filters should be correct: ...topdf filters use it for generating layout, pdftopdf for n-up and fitplot. My recent test files also show that pdftopdf does not break anything when landscape" or "orientation-requested" is supplied and not n-up or fitplot.
Tobias, can you also have a look into fixing the handling of collate by pdftopdf (see the other thread on this list)? Thanks.
Till