Bug 572338 - Using texttops to print in landscape mode results in misplaced page labels
Summary: Using texttops to print in landscape mode results in misplaced page labels
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups
Version: 5.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 593368 601516
TreeView+ depends on / blocked
 
Reported: 2010-03-10 22:01 UTC by Bryan Mason
Modified: 2018-10-27 12:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
: 593368 (view as bug list)
Environment:
Last Closed: 2010-09-28 12:21:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Actual (bad) results (282.09 KB, application/postscript)
2010-03-10 22:07 UTC, Bryan Mason
no flags Details
Expected (good) results. (282.07 KB, application/postscript)
2010-03-10 22:07 UTC, Bryan Mason
no flags Details
Proposed patch (1.10 KB, patch)
2010-03-10 22:10 UTC, Bryan Mason
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CUPS Bugs and Features 3563 0 None None None Never

Description Bryan Mason 2010-03-10 22:01:40 UTC
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.

Comment 1 Bryan Mason 2010-03-10 22:07:13 UTC
Created attachment 399191 [details]
Actual (bad) results

Comment 2 Bryan Mason 2010-03-10 22:07:45 UTC
Created attachment 399192 [details]
Expected (good) results.

Comment 3 Bryan Mason 2010-03-10 22:10:57 UTC
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.

Comment 4 Bryan Mason 2010-03-10 22:25:02 UTC
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.

Comment 7 Tim Waugh 2010-04-23 11:34:33 UTC
Reported upstream.

Comment 11 Jaromir Hradilek 2010-08-06 12:59:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.