Open Bug 1008392 Opened 11 years ago Updated 3 years ago

firefox misinterpret lpoptions when printing with cups on linux

Categories

(Toolkit :: Printing, defect)

29 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: eric.brunet, Unassigned)

Details

A bit of context: cups has a notion of "instances" or "saved options". They can be created by running the "lpoptions" command or (as lpoptions does) by editing the text files /etc/cups/lpoptions of $HOME/.cups/lpoptions. My lpoptions file reads Default dc21 Dest dc21 Duplex=DuplexNoTumble Dest dc21/2 Duplex=DuplexTumble number-up=2 Dest dc21/4 Duplex=DuplexNoTumble number-up=4 Dest dc21/simplex Duplex=None which means that I created three extra instances of printer dc21: when printing to dc21 I have duplex and (as a default) one page per sheet. One printing to dc21/2 I have two pages per sheet, when printing to dc21/simplex I remove duplex, etc. I can do "lpr -P dc21/4 foobar.pdf" and things work as expected. When printing from a kde application as okular, all my printer's instances are proposed. Now to the bug. It is twofold. 1) firefox does not propose to print to any of my instances. The only printer appearing (appart from "print to file") in the print dialog is dc21. Firefox should propose to print to dc21, dc21/2, dc21/4 or dc21/simplex (which, of course, simply consists of selecting different options for the same printer.) 2) it appears that firefox parse the lpoptions files, discard all information about instances and aggregates all the options given in all the instance of a particular printer. So for example with my particular lpoptions file the default options for printing are Duplex=None (the last Duplex option given) and number-up=4 (the last number-up option given). Even if firefox does not support instances (it should), it should ignore the options given for most instances of a given printer and only read the options of the default instance (the one without indicated as Default. In my case, it is dc21 and the only option set should be Duplex=DuplexNoTumble) To reproduce, it is extremely easy. Fire up an editor and open $HOME/.cups/lpoptions. Add a line towards the end which looks like Dest NameOfMyPrinter/Whatever number-up=8 (or any other option) and try to print with firefox. One does not need to restart firefox after a modification of the lpoptions file: it appears that firefox parses it each time the print dialog is open. I have lost quite a lot of paper and time before figuring out why firefox would not print as expected. Now, I have a workaround for the second part of the bug: the last line (and it is important that it is the last) of my lpoptions file is now Dest dc21 Duplex=DuplexNoTumble number-up=1 So at least printing to dc21 works as expected. I would like to see issue 1) resolved to so that I can print to dc21/2.
Component: Untriaged → Printing
Product: Firefox → Toolkit
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.