Printing Firefox to postscript printer SOLVED

Tommy Trussell tommy.trussell at gmail.com
Thu Jul 28 16:33:07 UTC 2005


I'm running Hoary PPC on a PowerBook G3, recently switched from
Debian. Under Debian I could print from Firefox to my PostScript
printer, but under Hoary I could not. This is a Lexmark Optra K 1220.
Printing from Firefox produced an error page such as:

-------------------
ERROR: invalidfont
OFFENDING COMMAND: StartData

STACK:

/CIDFont
dicttype
/Times_New_Roman.Regular.0.0
-100
----------------

Before I added the Microsoft web fonts package it used to hang up on
Bitstream_Vera_Sans.Bold.0.0

I tried all sorts of things regarding fonts and font paths in cups and
defoma. I can't remember all the things I tried. I looked at the
postscript code that comes out of Firefox and found a little section
of code that's supposed to run and print a helpful page if your
version of Postscript doesn't support the fonts or whatever. It SAYS
it's necessary for Postscript versions 2015 and greater, but I have
2016.100, so I guess that's why it didn't print the helpful page.

Anyway the page says to change your print command to reduce the
postscript code to "basic level 2."

Here's how to send Basic Level 2 postscript to your printer:

1) Choose Print in Firefox 1.0.x

2) Click the Properties button, and notice the print command says:

lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}

3) Change the Print Command to this (all on one line):

gs -q -sDEVICE=pswrite -sOutputFile=- -dNOPAUSE -dBATCH
-dMozConvertedToLevel2=true - | lpr
${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}


This command pre-processes the code through ghostscript before it goes
through the printer. It fixed the problem for me, though it took
several attempts before I got everything working. (I was probably
trying too many different things and I may very well have typed one of
the things above wrong.) The code also prints a comand that will
reduce the code to Postscript Level 1, but if you need that I hope
your printer was able to tell you so!




More information about the ubuntu-users mailing list