CUPS, Firefox, and PPD to force Black and White

Bill Moseley moseley at hank.org
Mon Nov 19 17:03:31 UTC 2007


I have a HP Color LaserJet 2605dn postscript printer.  I'd like to
make a separate black and white-only spooler and make it the default
to save on color toner when printing drafts and printing web pages.


So, I made a copy of my PPD file:


    $ diff HP_BW_LaserJet_2605.ppd HP_Color_LaserJet_2605.ppd 
    70c70
    < *ColorDevice: False
    ---
    > *ColorDevice: True

And created a new spooler entry in printers.conf.

    <DefaultPrinter HP_BW_LaserJet_2605>
        Info HP 2605dn - Black & White (drafts!)
        Location Office
        DeviceURI socket://color_laser:9100
        State Idle
        StateTime 1180200175
        Accepting Yes
        Shared Yes
        JobSheets none none
        QuotaPeriod 0
        PageLimit 0
        KLimit 0
        OpPolicy default
        ErrorPolicy stop-printer
    </Printer>
    <Printer HP_Color_LaserJet_2605>
        Info HP Color LaserJet 2605dn
        Location Office
        DeviceURI socket://color_laser:9100
        State Idle
        StateTime 1180200175
        Accepting YesL
        Shared Yes
        JobSheets none none
        QuotaPeriod 0
        PageLimit 0
        KLimit 0
        OpPolicy default
        ErrorPolicy stop-printer
    </Printer>

Now, printing from OpenOffice one spooler prints in B&W and the
other in Color.

But, printing from Firefox to the "HP_BW_LaserJet_2605" spooler still
prints in color.

Does Firefox somehow bypass the PPD?  Or does it enable color printing
by default?

I guess my PPD hack isn't correct, or there's something else I'm
missing on how the PPD is used by Firefox.

Is there a better way to set this up?

Here's the PPD I used (except modified to enable duplex):

http://www.linuxprinting.org/foomatic-db/db/source/PPD/HP/HP_Color_LaserJet_2605.ppd

and my lpoptions file:

    $ cat /home/moseley/.cups/lpoptions 
    Default HP_BW_LaserJet_2605



BTW -- Why doesn't Firefox offer the printer options from the PPD?
Just not a very advanced printing interface?  Can I pipe the output
from Firefox thorugh, say, gtkpl?





-- 
Bill Moseley
moseley at hank.org





More information about the ubuntu-users mailing list