Description of problem: When printing a document in landscape mode, and using the "texttops" PS engine instead of the default "texttopaps", the "page-label" option displays the label in portrait mode, while data is correctly printed in landscape. Version-Release number of selected component (if applicable): cups-1.3.7-11.el5 How reproducible: 100% Steps to Reproduce: 1. Modify /etc/cups/mime.convs to use the texttops filter to convert text/plain and text/html types to application/ps: $ egrep 'text/(plain)|(html)' /etc/cups/mime.convs text/plain application/postscript 33 texttops text/html application/postscript 33 texttops 2. Print a text file in landscape with a page-label: lpr -o landscape -o page-label="hosts" /etc/hosts Actual results: The page that is printed will look something like this: +--------------------------------------------------+ | | | | | P lorem ipsum Lorem ipsum dolor sit amet, P | | A sectetur adipiscing elit. Vestibulim erat A | | G diam, iaculis non tempor at, varius at G | | E lorem. E | | | | L L | | A A | | B B | | E E | | L L | | | | | +--------------------------------------------------+ The text is correct, but the page labels have the wrong orientation. Expected results: The page should print like this: +--------------------------------------------------+ | PAGE_LABEL-PAGE_LABEL | | | | lorem ipsum Lorem ipsum dolor sit amet, | | sectetur adipiscing elit. Vestibulim erat | | diam, iaculis non tempor at, varius at | | lorem. | | | | | | | | | | | | | | | | PAGE_LABEL-PAGE_LABEL | +--------------------------------------------------+ With the page labels in the same orientation as the text. Additional info: The attached PostScript files have examples of actual and expected results. These were generated by creating a generic PostScript printer with the command: # lpadmin -p psfile -v socket://localhost:12000 \ -P Generic-PostScript_Printer-Postscript.ppd \ -o printer-is-shared=true -E and then running a perl script that listened on port 12000 and copied whatever was sent there to a file.
Created attachment 399191 [details] Actual (bad) results
Created attachment 399192 [details] Expected (good) results.
Created attachment 399193 [details] Proposed patch The attached patch seems to resolve the issue, at least in the case that I've tested with a single page and simple printing (no multiple-up pages). It could use some additional review and testing.
This problem seems related to, but not the same as, the problem with the pstops filter being resolved in Bug 520141. The patch in that Bug makes labels print correctly if the texttopaps filter is used, but if the cups configuration is changed to use the textops filter, the labels are printed incorrectly again. Although the discussion in Bug 222137 (Comment 1 specifically) seems to indicate that the text filters should _not_ rotate the text and that pstops will perform the rotation, I observed that the texttopaps filter does indeed rotate the text. Hence the rationale behind the proposed patch. Once the text is rotated by textops, pstops seems to be able to add the labels correctly.
Reported upstream.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In a landscape mode, printing the page using the "texttops" filter resulted in misplaced page labels. This has been fixed, and the page labels now always have the correct orientation.