Test page is printed only once if duplex is selected

Bug #939530 reported by Till Kamppeter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bannertopdf
Fix Released
Medium
Lars Karlitski
cups-filters (Ubuntu)
Fix Released
Undecided
Lars Karlitski

Bug Description

bannertops had printed the test page twice whn duplex was selected to be able to check whether the back side is correctly printed, too. pannertopdf should do the same thing.

Even better: Print N (or in case of duplex 2N) copies of tyyhe test page when N-up is selected, to be able to see whether each print position on the sheet gets printed correctly.

Lars Karlitski (larsu)
Changed in bannertopdf:
status: New → Confirmed
assignee: nobody → Lars Uebernickel (larsu)
importance: Undecided → Medium
Revision history for this message
Lars Karlitski (larsu) wrote :

Multiple pages are now output when the printing options contain duplex or number-up.

Changed in bannertopdf:
status: Confirmed → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

larsu, thank you for the quick fix.

testing and upstreamizing ...

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

larsu, Duplex works now with test page on both sides, but number-up has problems. First page of each sheet side appears correctly, second page appears much smaller than first page and rotated by 90 degrees in the first page.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

If printing A4 duplex (no number-up) on my HP OfficeJet Pro 8500A, on the back side the lower border of the frame disappears and the page content is slightly moved down. Perhaps some adjustment is needed, but it can also be the printer or the driver.

Revision history for this message
Lars Karlitski (larsu) wrote :

Hm, sounds like an issue in pdftopdf, all bannertopdf is doing is putting the same page into the tree multiple times. Reassigning to cups-filters (but I'll take a look at it, anyway).

Changed in cups-filters (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

bannertopdf fix upstreamized to cups-filters BZR on OpenPrinting.

Changed in bannertopdf:
status: Fix Committed → Fix Released
Changed in cups-filters (Ubuntu):
status: New → Triaged
status: Triaged → Confirmed
Revision history for this message
Lars Karlitski (larsu) wrote :

After some investigation, I think I have found the cause of the number-up problem: The test page contains more q than Q operators ('q' saves the current graphics state onto a stack, 'Q' pops one from the stack). This isn't a problem when showing the page is shown on a physical page, because the graphics state is reinitialized on every page.

When pdftopdf does number-up, it copies multiple of pages onto one physical page. Since the graphics state hasn't been fully restored, every page after the first is translated by whatever matrix is still on top of the stack.

I have a fix for the test page, which unfortunately doesn't fix the problem fully: Something seems to be messing up the q/Q operators again when saving the PDF in bannertopdf. I'll post everything as soon as I have found this second issue.

Revision history for this message
Lars Karlitski (larsu) wrote :

My mistake, there's no second bug (I saw weird results because of a corrupted install on my system).

Bannertopdf r29 contains the fixed test page.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Applying all your fixes from the bannertopdf repository, rev 25..29 the problem gets fixed. I will apply these fixes upstream and to the cups-filters package, which will probably get uploaded tomorrow together with other bug fixes.

Changed in cups-filters (Ubuntu):
status: Confirmed → Triaged
Changed in cups-filters (Ubuntu):
status: Triaged → In Progress
Changed in cups-filters (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.4-1

---------------
cups-filters (1.0.4-1) unstable; urgency=low

  [ Till Kamppeter ]
  * New upstream release
    - cups-filters 1.0.4 release
    - texttopdf: Fall back to altermative fonts via fontconfig if the
      FreeMono TrueType fonts are not installed (Closes: #495598,
      Closes: #662660).
    - bannertopdf: Fix off-by-one error in page duplication
    - bannertopdf: Put indirect references to streams into the page's
      contents
    - bannertopdf: Let byte offsets for the Xref table of the PDF output
      being determined correctly also when the output goes to stdout
      (LP: #939735).
    - bannertopdf: Output multiple copies of the test page if duplex
      and/or N-up is chosen, to let the test page appear on all possible
      positions of the sheet (LP: #939530).
    - bannertopdf: Scale test page template to fit the job's page size,
      get and display full page geometry information, draw the frame which
      marks the printable area 1pt smaller, to assure that it gets completely
      visible (LP: #921073).
  * debian/local/default-testpage.pdf: Added missing "Q" operator to the end of
    the page. This broke N-up printing with pdftopdf (LP: #939530).
  * debian/control: Added explicit build dependency on libfontconfig1-dev.
    (Closes: #661127)
  * debian/control: Changed font dependency (for texttopdf) to "ttf-freefont |
    fonts-liberation | ttf-dejavu" instead of only "ttf-freefont"
    (Closes: #495598, Closes: #662660).

  [ Martin Pitt ]
  * debian/control: Build against libpng-dev, with an alternative to the older
    libpng12-dev. (Closes: #662295)
  * debian/control: Prefer building against libtiff5-dev if available, falling
    back to libtiff-dev.
  * debian/control, debian/rules: Move from hardening-wrapper to using
    dpkg-buildflags. Bump dpkg-dev build dependency to (>= 1.16.1~) for this.
  * debian/copyright: Update Format header for official copyright format 1.0.
  * debian/control: Bump Standards-Version to 3.9.3.
  * debian/rules: Drop LC_MESSAGES setting, leftover from cups.
  * debian/control: Bump libcupsimage2-dev build dependency to ensure to build
    against a version which does not conflict on the libtiff?-dev build
    dependency.
 -- Martin Pitt <email address hidden> Wed, 07 Mar 2012 14:36:49 +0100

Changed in cups-filters (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.