[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Firefox no print issue

On Fri, Jun 10, 2005 at 10:47:14PM -0500, Jim Hall wrote:
> No matter what I do, this prints on the first page. Each line starts at 
> the end of the previous one (meaning they're staggered).
> <</HWResolution[600 600]>>setpagedevice
> %!PS-Adobe-3.0
> %%Pages: (atend)
> %%BoundingB

That "<</HWResolution[600 600]>>setpagedevice" is not supposed to occur
in that position, i.e. before the %!PS line (also, it's pretty useless,
anyway[1]). Although those %-lines are just comments[2], postscript-wise,
the problem is that many printers use those first 4 chars "%!PS" to
auto-detect whether to switch into PS- or text-mode.  It looks as if
your printer is one of those, obediently printing out the whole PS code
as plain text... ;(

I suspect it's CUPS's "pstops" filter - not Firefox - that's adding
that superfluous setpagedevice stuff via PPD infos.  So, next thing to
try would be to send the PS file directly/unfiltered to the printer[3].
Try lp/lpr option "-o raw" (http://www.cups.org/doc-1.1/sum.html#4_7 )
for that.  If you just want to print the file as it drops out of
Firefox (i.e. without any n-page-up transformations, duplex printing,
etc.), you should normally not need any pstops processing...


[1] it's meant to make your printer print at 600 dpi.  Except in very
rare cases, it's undesirable to explicitly tell a printer the physical
resolution to print at.  Almost any printer will default to the highest
possible value -- which is typically what you want anyway, as it gives
best print quality.  Also, not all printers can switch hardware
resolution, so the printer might even refuse to print at all in that
case.  In short, setpagedevice often does more harm than good...
For anyone interested, all the technical details can be found here:
section 6.1.1 / p.394ff, or p.414 specifically.
(I could add a whole rant on other incorrect usage of setpagedevice,
but I won't -- it might get long, and come across more emotional than
what people would expect here... ;)

[2] DSC comments, more precisely (Document Structuring Conventions):

[3] your printer does handle PostScript natively, does it??  In case
not, your problem would be an entirely different one... (i.e. CUPS not
being set up to do the then required PS -> PCL filtering).

Reply to: