I am wondering why printing in Firefox in Linux on a PostScript
printer takes so long.
Here is my setup: SuSE 10.0 using CUPS; Brother HL-5150D laser printer
(which is a native PostScript printer) hooked up via USB; recent
Firefox (either 1.0.6 or 1.0.7); PPD file from the Brother CD that
comes with the printer.
When I used this printer from Windows XP to print pages from Firefox,
pages would start emerging from the printer within seconds after I
clicked "print." This was true with both the Brother PCL Windows
driver and the Brother PostScript Windows driver. After printing
started, the pages would continue to emerge at top speed until all the
pages were printed.
Then I tried the new SuSE. Firefox printing is extremely slow. Even
when printing relatively simple webpages (e.g. a newspaper article
from washingtonpost.com after clicking on "Print this article" in the
webpage, which leaves only one ad in the printout) it can take over
two minutes for printing to even begin. After I click on "Print" in
Firefox, Firefox quickly completes its printing process, handing the
job off to the print spooler and allowing me to continue web browsing.
(This process is complete in, say, two seconds.) This also causes the
light on the printer to turn from green to amber (indicating that it
is receiving data.) The light will flash, indicating data is coming
in, and the printer will make some warming-up sounds.
The delay comes in at this step. The printer will sit there for
several minutes, with the light flashing, but printing nothing. After
printing begins, the printer will print a single page, and then there
is another pause of a minute or so until the next page comes out.
These pauses continue until printing is complete.
I know Firefox uses lpr by default, so I got it to use KPrinter by
following the directions here:
http://www.granneman.com/webdev/browsers/mozillafirefoxnetscape/linuxspecific/kdeprintinginmozilla/
When I use KPrinter (which is set to use CUPS and has the Brother PPD
installed), the KJobViewer will show the printing job almost instantly
after Firefox has completed its printing task. KJobViewer will show
the job as "Processing" while the printer's amber light is flashing
slowly.
I did some tests of my own to try to figure out what is going on. I
tried using Firefox to print to a PostScript file rather than straight
to the printer, and then using the KDE PS viewer to print the file.
This makes no difference in print speed. Creating a PDF and printing
that out prints out perhaps a bit faster, but with considerable
sacrifice in print quality.
I also tried printing from my Windows laptop via the Linux machine (I
set up printer sharing through Samba.) I configured Samba to have my
Linux machine provide an anonymous print server, and I then installed
the HL-5150D PostScript driver on the Windows machine.
Then--boom!--printing the same webpage from Windows was very
fast--pages start coming out almost instantly--while the Linux machine
is very slow. (I made sure that all the settings in the Windows and
Linux drivers--e.g. DPI--were identical.)
I tried printing in Konqueror, which is no faster.
My most fruitful test was to try something I had learned earlier in
Windows with an inkjet: I copied an entire webpage from Firefox by
pressing "Control - A", and then I pasted this into OpenOffice.org
Writer. I printed this page, which contained all the same graphics.
Bam!--this printed out very quickly, just as quickly as Windows. The
fonts were a bit different from the Firefox printout, but sill of
top-notch quality; the graphics were of the same top-notch quality.
I noticed that, when printing directly from Firefox, the job size
shown in KJobsViewer is in the neighborhood of 300k for a newspaper
article of four pages or so that contains a few simple chart graphics
(like the Wall Street Journal.) This is well below the 16MB of memory
that is standard in the Brother HL-5150D.
I have also printed a PDF from Linux (the SMB Howto in PDF format.)
This printed extremely rapidly; just as fast as Windows printing.
So what I am wondering is: why is printing webpages in Firefox so much
slower in Linux than it is in Windows? Obviously the cut-and-paste
workaround I detailed above works okay, but I am curious as to why
printing straight from Firefox (and from Konqueror, for that matter)
is so slow, especially when essentially the same data in
OpenOffice.org prints out very quickly. Not only am I curious as to
the reason Firefox prints so slow in Linux compared to Windows, but of
course I am interested in any solutions (other than the cut-and-paste
workaround.) If you're kind enough to answer my question, please cite
sources of information so I can read further and learn more. Thank
you. |