# firefox printing + hp laserjet 2200d = postscript error

## fratzlow

Hi,

as in one thread suggested I switched the print command in the properties box of firefox to

```
kprinter --stdin
```

Problem is, the page printed only displays the following error message:

 *Quote:*   

> The Postscript interpreter in your printer is 2014.116
> 
> This printout requires at least version 2015 or greater
> 
> 

 

I use cups and the ppd file "HP-LaserJet_2200-Postscript.ppd" provided by www.linuxprinting.org

Other KDE applications print just fine. Only firefox doesn't work at all.

ghostscript version: 7.07.1

Do I have to enable a switch to be backward compatible somewhere? Can I update this postscript stuff of a printer? I always used PCL 6 with Windows and everything was fine. What about these mysterious filters? Will they help?

TIA

Frank

----------

## bsolar

Moved from Installing Gentoo.

----------

## reeder

I have a very similar problem, but with a Lexmark Optra R+ (postscript) laser printer on the parallel port (/dev/lp0).  I can print from some apps, like acroread, gpdf, and staroffice, as well as from the command line (with lp, printing plain text files).  But I cannot print from Mozilla 1.7.3 or Firefox 1.0.

First, the installed packages:

```
net-print/cups-1.1.20-r5 -debug +pam -slp +ssl

net-print/footmatic-3.0.2 

net-print/foomatic-db-20040302 +cups +ppds

net-print/foomatic-db-engine-3.0.2

net-print/foomatic-filters-3.0.2

media-gfx/gimp-print-4.2.6 +nls +gtk +readline +cups +foomaticdb +ppds

app-text/ghostscript-7.07.1-r7 +X +cups -cjk -emacs -debug

net-www/mozilla-firefox-1.0 -java +gtk2 -ipv6 -moznoxft +truetype -xinerama -debug +gnome +gtk2 +ldap -xprint -mozdevelop -mozxmlterm
```

A bit of historical data: I had to reload my system due to a disk failure.  This was all working before the disk failure and I did have backups of almost all configuration files.  But I used the backup files for reference rather than simply restoring them.

I configured cups using the Gentoo Printing Guide.  I used a backup copy of my kernel config to build my kernel (this same kernel version was installed and working prior to the failure, including printing from firefox), so everything should be there.

I was even able to cat the "Hello World" test file to /dev/lp0 and get output.

I started cupsd, then looked up my printer at linuxprinting.org and it said to use the postscript driver and gave me a PPD which I installed into /usr/share/cups/model.  In spite of that I also ran foomatic-configure, like so:

```
# foomatic-configure -s cups -p Lexmark-Optra_Rplus -c file:/dev/lp0 -n WWLaser -d Postscript
```

I got an error message, but didn't write it down.  I then restarted cupsd and pointed my browser at http://localhost:631.  I saw my printer and it was ready.  I reconfigured to set the resolution to 600 dpi (as recommended by linuxprinting.org for 2MB memory printers) and I printed the test page and it was beautiful.

I also did "lp /etc/passwd" and it printed (with slight margin problems).  I ran gpdf and printed a 5 page pdf file.  I also used acroread and staroffice and was able to print in all cases.  So cups seems to work.

But when I ran firefox and tried to print the output had a couple of lines, then the following error:

```
ERROR: ioerror

OFFENDING COMMAND: imagemask

STACK:

--nostringval--
```

Hmmm.  According to the cups web interface (configure printer button), I have it set to duplex on the long edge, print on US/Letter paper at 600dpi, do no pre-filtering, and not use banner pages before or after the job. 

I checked the PPD and noticed these lines:

```
*PSVersion:     "(3010.000) 550"

*PSVersion:     "(3010.000) 651"

*PSVersion:     "(3010.000) 652"

*PSVersion:     "(3010.000) 653"

*PSVersion:     "(3010.000) 704"

*PSVersion:     "(3010.000) 705"

*PSVersion:     "(3010.000) 800"

*LanguageLevel: "3"
```

The cups test page says that I have a Level 2 Postscript printer and the version is "2014.500 (950901)".  So I go back to the web and reconfigure the printer to prefilter input to postscript level 2.

Now I get this fancy-shmancy page telling me that my interpreter is 2014.500 and the printout requires version 2015 or greater.  It recommends that I change my print command and I do it.

Now I get no lines of my web page -- only this error:

```
ERROR: ioerror

OFFENDING COMMAND: readstring

STACK:

--nostringval--

2Q

67

48

7852

1479

--nostringval--
```

Somewhere along the line as I was trying different things I had it use the "default" resolution and do no prefiltering and I was able to get firefox to print.  Then -- yes, I'm an idiot -- I tried different permutations to see what might cause breakage.  Everything did in every combination, including putting it all back to the default!  So now I cannot print at all from firefox.

Any ideas?

-- William

PS. I fixed the slight margin problems mentioned above by editing the PPD and changing the *ImageableArea line for US Letter to read as follows:

```
*ImageableArea Letter/US Letter: "13 13 599 779"
```

I got the idea for that from somewhere, in a FAQ about margin problems.  It did fix the margin problem.  -- WPR

----------

## JackDog

Same problem. Dont get an error though. Every app prints except firefox.

----------

## reeder

I guess I didn't try every permutation.  But I just found one that seems to work.  Point your browser to http://localhost:631 (or whatever port you assigned in /etc/cups/cupsd.conf) and configure your printer to "Convert to Level 1" (ghostscript pre-filtering).  Click "continue" and then try to print using firefox's normal print command.

Just for completeness, my print command (click "Properties" in the print dialog) is

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

If that prints, did you see a header and footer?  If not, you might be getting bitten by the margin settings used by Mozilla/Firefox.  To find the proper margins, print a test page from cups (http://localhost:631).  It will tell you on the page what the margins are.  Then, in Mozilla/Firefox/Thunderbird, the Properties popup (from the print dialog) has a list of values under the heading "Gap from edge of paper to Margin (inches)".  Set those and you should now see page numbers and URLs.  :-)

Also, to repeat, if you ever print plain text and the first few characters of each line are chopped off because the printer is trying to print too close to the edge, go into /etc/cups/ppd and edit the ppd file for your printer (make a backup copy first).  Look for the lines that begin with "*ImageableArea".  There will be one such line for each paper size.  The four numbers at the end of each line are the size of the unprintable area at each margin, in the order left, bottom, right, top.  The values are in points, and there are 72 points in an inch.  My CUPS test page said that my imageable area was measured from the lower left corner at 0.17"x0.17" to the upper-right at 8.33"x10.83in.  I multiplied each of those by 72 and rounded up for the lower-left values and rounded down for the upper-right, giving me

```
*ImageableArea Letter/US Letter: "13 13 599 799"
```

Restart cupsd (/etc/init.d/cupsd restart) and give it a whirl.

Good luck,

-- William

----------

