Open Bug 478733 Opened 15 years ago Updated 2 years ago

use gtk_paper_size_new_from_ppd instead of gtk_paper_size_new for ppd strings

Categories

(Core :: Printing: Setup, enhancement)

x86_64
Linux
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: dev_oskar, Unassigned)

References

(Blocks 1 open bug)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1.2 Firefox/3.0.6

Trying to use a non default paper size (from printer or a custom one), the page setup and firefox print preview will be out of sync to the real output.

This is tested with a pos printer (TSP100) set to a pos printer size:

A error is shown:
Gtk-WARNING **: Unknown paper size ppd_X72MMY200MM


Reproducible: Always

Steps to Reproduce:
Set a non common paper size for the printer under page setup.
Actual Results:  
Print Preview and rendering uses the right paper size, print back end doesn't.

Gtk-WARNING **: Unknown paper size ppd_X72MMY200MM

Looks like A4 paper is used (redirecting to cups-pdf: a4 page seems to be created and the rendering is at the bottom left) so the printout of each page starts with a huge gap.

Expected Results:  
Printer backend creates output with the right paper type and doesn't use hard coded paper names or sizes. (Like on Windows, with the same setup the printout is fine) Print Preview tries to get the sizes of the paper from the real backend and not somewhere in between.


The problem isn't webpage specific, Minefield has the same error.

This is a generally problem and not specific to the printer.
The whole design between the Print Dialog and the actual printing seems to be broken. nsPaperPS.cpp as example defines only 7 fixed paper sizes.
now, this is an interesting bug (unlike the other).

http://library.gnome.org/devel/gtk/2.11/gtk-GtkPaperSize.html#gtk-paper-size-new

that warning comes from:

gtk_paper_size_new

there is another function:

gtk_paper_size_new_from_ppd

which is much more likely to work given a string "ppd_X72MMY200MM".
Severity: major → enhancement
Component: General → Printing: Setup
Product: Firefox → Core
QA Contact: general → printing.setup
Summary: Paper size setting problem with GTK Print Dialog / CUPS output / Print Preview → use gtk_paper_size_new_from_ppd instead of gtk_paper_size_new for ppd strings
Version: unspecified → Trunk
Blocks: 947125
Not to derail the topic, but I get the same warning when clicking the "Print" button in an Outlook Webaccess (webmail) email (with Iceweasel 31.6.0 on Debian/amd64):

(iceweasel:1674): Gtk-WARNING **: Unknown paper size

$ cat /etc/papersize
letter

Note: no printer is installed and I'm not trying to actually print anything but the "Print" button opens a new tab with a printable view of the same email, and all is well. It's just the warning that gets printed to the console when doing that.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.