# Laser Printer - Printing only Some Stuff



## Ruler2112 (Nov 16, 2011)

I have a Brother HL5040 laser printer connected to my FreeBSD 8.2/amd64 box via USB.  I'm using CUPS to print and everything was going well yesterday - I was able to print the e-mail I needed to, complete with graphics, so I figured everything was all set.  However, I tried printing from LibreOffice today and no joy.  Instead of the poster I was expecting, I got:


```
%%[ Error handled by opdfread.ps : ioerror; OffendingCommand: --nostringval-- ]%

<BLANK PAGE>

ERROR:
ioerror
OFFENDING COMMAND:
--nostringval--
STACK:
-mark-
-mark-
-mark-
-mark-
```

This is when I stopped the print job so as not to waste further paper.

I've tried setting the printer as a HL-5040 CUPS+Gutenprint v5.2.7 (en) (which resulted in the test page being garbled), HL-5040 Foomatic/ljet4 (which is how it worked yesterday for the e-mail), HL-5040 Foomatic/hl1250, and a HL-1440 Foomatic/hl1250.  All except the first produce the same output when printing from LibreOffice.  I exited and re-opened LibreOffice between each change.

While I need to be able to print from LibreOffice, I decided to try an experiment and exported the drawing to a PDF.  I then opened it with KPDF and tried printing, feeding in only a single sheet of paper manually.  The following is the only thing that was printed on the page; I canceled the print job at the printer since it obviously didn't work.


```
#CUPS-COMMAND
             AutoConfigure
```


I know that this has got to be a configuration problem somewhere - this same document printed fine on the same printer in Slackware and I never had problems printing PDFs before, no matter what content.  To confirm it's not a problem printing graphics, I tried printing the google home page from Firefox using the ljet4 filter - worked fine.  

I'm at a loss of what to try next and would appreciate any ideas.


----------



## Ruler2112 (Nov 17, 2011)

I found a solution, though it's something that must be repeated every time I print.  There's got to be a way to save the setting, but I can't find it for the life of me.

In LibreOffice, a printer setting dialog box pops up when printing.  If I click the Properties button, a printer option box pops up.  Switching to the Device tab reveals a drop-down list labeled Printer Language Type.  The default setting is PDF.  If I change this to PostScript (Level from Driver), it prints fine.  If I exit out of the document and go back in, or even open a different document without closing the first, the setting reverts to PDF and printing is hit-or-miss.

In KPDF, there is no such setting that I have been able to locate.  I'd be willing to bet that the reason this doesn't print right is similar - it's outputting PDF to the printer rather than PostScript.

I was thinking that there must be a setting in KDE somewhere that controls what language is sent to the printer, but 20 minutes of searching has yielded exactly nothing.  (Other than frustration.)  There's nothing in CUPS, but I wouldn't expect there to be; just by the feel, seems like an incorrect KDE printer sub-system setting to me.

Anybody ever run into this before or know where I can find a setting in KDE to control what type of output is sent to the printer???


----------



## fmw (Nov 21, 2011)

Which printer driver are you using? Usually, these options are defined in the printer driver, that is to say, you should be able to change them in the CUPS web interface.


----------



## Ruler2112 (Nov 22, 2011)

fmw said:
			
		

> Which printer driver are you using? Usually, these options are defined in the printer driver, that is to say, you should be able to change them in the CUPS web interface.



Aren't these drivers?  If not, I don't know what you mean.



> I've tried setting the printer as a HL-5040 CUPS+Gutenprint v5.2.7 (en) (which resulted in the test page being garbled), HL-5040 Foomatic/ljet4 (which is how it worked yesterday for the e-mail), HL-5040 Foomatic/hl1250, and a HL-1440 Foomatic/hl1250.




I looked in the printer options for each and didn't see anything that specified to output postscript.  In fact, I've since set it to be a generic postscript printer and _still_ had the same problem!

I do believe it's a problem with/setting in KDE - discovered I could print a PDF from kghostview while the same PDF prints like the above in kpdf.  Couldn't find a kpdf port, either on my system or on freshports, so I'm guessing it's provided by a different port...

I can now get LibreOffice to print correctly, but I still have to do the workaround of resetting the printer language output every time; haven't been able to find a way to save it.


----------

