Scale-to-fit the generated page onto the printer's page size

Bug #921073 reported by Lars Karlitski
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bannertopdf
Fix Released
Critical
Lars Karlitski
cups-filters (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Currently, the generated page has the same size as the template.

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

The fix of this bug is not only a nice-to-have for printers which are usually be used with paper much smaller or much larger than A4 or Letter, but it is essentially important that the document sent to the printer has the page size requested in the job (PPD default or user-requested).

Your template page is A4, and if you send an A4-sized document to a laser printer with Letter loaded, the printer will refuse to print and ask to insert A4. So it is essentially important that test pages and banners are sent out in the size assigned to the job (default size of PPD or size requested by user).

So the bug needs to get fixed quickly (wanted to set it to "Release Critical" but I cannot change Importance).

Lars Karlitski (larsu)
Changed in bannertopdf:
importance: Medium → Critical
Revision history for this message
Paul Sladen (sladen) wrote :

Seems to be trying to printer to "iP-B4" paper, which is upsetting the printer.

Changed in cups-filters (Ubuntu):
milestone: none → ubuntu-12.04-beta-2
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Paul Sladen (sladen) wrote :

Could this be just a typo?

  210 x 279 mm is what it's making

and
  210 x 297 mm is A4

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

I have tested now and principally it works, especially for A4/Letter. There is still a problem with page sizes which are well differnt to A4/Letter. On the HP OfficeJet Pro B8500A (hpcups driver) I have printed the test page on "Photo 4x6" paper size. The resulting page has to large spaces at the top and between the color wheels and the printer property text. The text touches the lower border of the printable area and the lower border of the frame is not drawn. Scanned page attached.

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

Till, thanks for testing, I can reproduce it with the same PPD.

Changed in bannertopdf:
status: Fix Committed → In Progress
Revision history for this message
Lars Karlitski (larsu) wrote :

> The resulting page has to large spaces at the top

This happens, because bannertopdf preserves aspect ratio of the page when scaling it. It's unfortunate that the margins get relatively large on media that have vastly different aspect ratios (such as photos), but I think it's better than stretching the page.

> and between the color wheels and the printer property text

Fixed in r21

> the lower border of the frame is not drawn

I can't reproduce that, as I don't have the printer here. I have offset the rect by 1pt (as is done by bannertops). Please test if this fixes your issue (r22).

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

Great, it works perfectly now. This is how it should be.

Changed in bannertopdf:
status: In Progress → Fix Released
Changed in cups-filters (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I will release cups-filters 1.0.3 with this fix soon and package it for upload right after the beta1 release.

Changed in cups-filters (Ubuntu):
status: Triaged → In Progress
Changed in cups-filters (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

larsu, I tested now whether your fix also works for paper sizes which are wider than high and selected A5 landscape-oriented (It fits into A4 and therefore can easily be tested on most inkjet printers). I printed on the HP OfficeJet Pro 8500A (with the hpcups driver, any inkjet with custom paper size support should work) using the command:

lpr -P OJP8500 -o PageSize=Custom.595x421pt /usr/share/cups/data/testprint

and got the attached result.

larsu, awesome. Your bannertopdf is perfect now!

Paul, you could use this as an example when presenting the new test page.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.3-0ubuntu1

---------------
cups-filters (1.0.3-0ubuntu1) precise; urgency=low

  * New upstream release
     - cups-filters 1.0.3 release
     - bannertopdf fixes: 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/control: Added explicit build dependency on libfontconfig1-dev.
 -- Till Kamppeter <email address hidden> Thu, 1 Mar 2012 18:35:51 +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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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