Why does my Brother HL-5250DN give ioerror on command fill when printing certain images?

Asked by Dan Connolly

This Brother HL-5250DN mostly works with Ubuntu, but in some cases (I'll attach one in PDF...), when I ask it to print, all I get is a printed error message in a grey box:

ERROR NAME;
   ioerror
COMMAND;
   fill
OPERAND STACK;

I found a Jan 2007 problem report with similar symptoms:
http://ubuntuforums.org/showthread.php?p=3205799

I also found this:

<h2><a name="6.21 Documentation"></a>Documentation</h2><pre>

Fixes problems:
        - The PDF writer could get an ioerror when downsampling images whose
size wasn't an exact multiple of the downsampling factor.
(doc/News.htm [1.31]: 2000/04/13 16:44:59 lpd)

http://svn.ghostscript.com/ghostscript/tags/ghostscript-6.21/doc/History6.htm

My current work-around is to print to another printer. :-/

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Gareth Fitzworthington
Solved:
Last query:
Last reply:
Revision history for this message
Dan Connolly (connolly) said :
#1

This PDF document triggers the problem:
http://lists.w3.org/Archives/Public/www-archive/2007Nov/att-0057/bball-sched.pdf

p.s. is there no way to attach files to a support question?

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Dan Connolly (connolly) said :
#3

the problem persists. Help, please?

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#4

The problem you describe is probably Bug #147759.
Your printer driver is probably " HL-5250DN BR-Script3" ?
GOTO System-> Administration-> Printing to check this.

This driver is the Foomatic driver used by default in Ubuntu (and most, if not all, other Linux distributions). This driver appears to have a rendering issue when printing graphic content via the GTK Printing API. Programs like Evince and Eye-of-Gnome use this to print. Acroread & xpdf don't - they should work.

This problem will probably affect anyone using a "...BR-Script3" Foomatic printer driver.

The solution is to use the Brother drivers for this printer. The Brother Linux drivers are open source & GPL. They are also much faster than the Foomatic drivers.

Brother gives detailed instructions here: http://solutions.brother.com/linux/en_us/

The following will probably be sufficient to get you going.
      1. Get appropriate Debian "LPR driver" here: http://solutions.brother.com/linux/sol/printer/linux/lpr_drivers.html

      2. Install Debian LPR driver in terminal window using: sudo dpkg -i --force-all --force-architecture xxxx.deb [note: change xxxx appropriately]

      3. Get appropriate Debian "CUPS driver" here: http://solutions.brother.com/linux/sol/printer/linux/cups_drivers.html

      4. Install Debian CUPS driver in terminal window using: sudo dpkg -i --force-all --force-architecture cupswrapper-xxxx.deb [note: change xxxx appropriately]

      5. GOTO System-> Administration -> Printing. You should see your printer installed with a driver marked "Brother XXXX.. for CUPS", where XXXX is your printer model. Try a test page. If it works your done. If not then do step 6.
Note:(If your printer appears twice in the installed printer list then delete the one with the "..BR-Script3" driver - you will no longer need this one).

      6. ONLY DO THIS IF STEP 5 DIDN'T WORK.
          Delete the relevant printer (ie. the one your trying to install).
          Then, Click-on Add New Printer
                           --- then click-on "Choose printer" (and then choose your printer)
                           --- Then click-on "choose driver". Ensure you choose the Brother driver "Brother XXXX.. for CUPS" NOT "XXXX... BR-Script3" - both of these will be in your "choose driver" list, where XXXX is your printer model.

Note: See Brother's detailed instructions if you have a 64 bit PC.

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#5

Point of clarification:

In step 5 above where I say "Choose printer", should read "Change device URI"
                         where I say "choose driver", should read "Change make & model"

At the "Change device URI" - this is where you choose your USB, network, or parallel printer from the list.
At the "Change make & model" - this is where you choose the "Brother XXXX.. for CUPS" NOT the "Brother XXXX... BR-Script3"

If you encounter a problem then refer to Brother's detailed instructions as the exact procedure can vary considerably for different systems, printers & interfaces.

Revision history for this message
Dan Connolly (connolly) said :
#6

Well, the driver seems to install fine, but now I can't print at all.

I can telnet to the printer and print plain text, but the "print test page" button in System-> Administration-> Printing doesn't work; it says "Test page submitted as job 235" (where 235 goes up one each time) but the job never shows up in the printer applet's queue.

The brother docs say to make sure lpr is installed; it's not. When I try to install it, apt says:

The following packages will be REMOVED:
  cupsys-bsd ubuntu-desktop

so I bailed.

More clues, please?

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#7

Firstly, I'd say you were correct in not allowing cupsys-bsd to be removed. Removal of cupsys-bsd is not wanted nor required. When Bother says "make sure lpr is installed" they mean their lpr (which is brhl5250dnlpr-2.0.1-1.i386.deb). Not lpr as list by the "Synaptic Package Manager" in Ubuntu. "lpr" as list by the "Synaptic Package Manager" is how Linux systems printed before CUPS came along.

To check if Brother's lpr is installed you can use "Synaptic Package Manager" but do a search for "brother" and look for something like "brhl5250dnlpr". The Brother CUPS driver should also show up here.

Assuming your drivers are installed correctly, then the following suggestion may help.

It sounds like you're using the HL5250DN via an ethernet connection.
GOTO System-> Administration -> Printing.
Check that your device URI is the appropriate one for a network connection (It should say something similar to: socket://192.168.1.47:9100 but with the correct IP address).

If you click the "change..." button adjacent to the "Device URI", Ubuntu should search the network for your printer (and find it if you can Telnet to it!). The correct network settings will be captured at this point.

Remember, with the "Change make & model" button to choose the "Brother HL5250DN for CUPS" NOT "Brother HL5250DN BR-Script3".
Also, if you want to go back to the Foomatic driver at any point, just choose "Brother HL5250DN BR-Script3" here.

Revision history for this message
Dan Connolly (connolly) said :
#8

yes, via ethernet. And I'm pretty confident about the Device URI, socket://192.168.1.106:9100 , since (a) Ubuntu finds that if I delete the printer and re-created it and (b) I can telnet to 192.168.1.106 9100 and type HELLO and the printer prints it.

And yes the make/model/driver is "Brother HL5250DN for CUPS".

But when I hit "Print Test Page", nothing happens (that I can see).

I wonder if there are some logs to check for errors or progress?

Revision history for this message
Dan Connolly (connolly) said :
#9

aha! I found this in /var/log/cups/error_log
E [30/Dec/2007:13:36:07 +0000] [Job 239] No %%BoundingBox: comment in header!

so I ran tail -f on that file and hit "Print Test Page" again and the job numbers and
the timing match:

E [30/Dec/2007:13:40:38 +0000] [Job 240] No %%BoundingBox: comment in header!

Revision history for this message
Dan Connolly (connolly) said :
#10

plugging that diagnostic into google led me to http://ubuntuforums.org/showthread.php?t=358025
which suggested ... in the /etc/cups/cupsd.conf -
LogLevel Debug instead of Loglevel warning.

Hmm... upon closer inspection, the job seems to have run OK:

I [30/Dec/2007:13:50:01 +0000] [Job 244] Adding start banner page "none".
I [30/Dec/2007:13:50:01 +0000] [Job 244] Adding job file of type application/postscript.
I [30/Dec/2007:13:50:01 +0000] [Job 244] Adding end banner page "none".
I [30/Dec/2007:13:50:01 +0000] [Job 244] Queued on "HL-5250DN" by "guest".
D [30/Dec/2007:13:50:01 +0000] [Job 244] hold_until = 0
D [30/Dec/2007:13:50:01 +0000] [Job 244] job-sheets=none,none
D [30/Dec/2007:13:50:01 +0000] [Job 244] banner_page = 0
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[0]="HL-5250DN"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[1]="244"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[2]="guest"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[3]="Test Page"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[4]="1"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[5]="job-uuid=urn:uuid:2744dde4-1f55-37d5-4378-be9f24a9fd4d"
D [30/Dec/2007:13:50:01 +0000] [Job 244] argv[6]="/var/spool/cups/d00244-001"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[8]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[9]="SERVER_ADMIN=root@pav"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[10]="SOFTWARE=CUPS/1.3.2"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[11]="TMPDIR=/var/spool/cups/tmp"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[12]="TZ=User defined"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[13]="USER=root"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[16]="IPP_PORT=631"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[17]="CHARSET=utf-8"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[18]="LANG=en_US"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[19]="PPD=/etc/cups/ppd/HL-5250DN.ppd"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[20]="RIP_MAX_CACHE=8m"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[21]="CONTENT_TYPE=application/postscript"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[22]="DEVICE_URI=socket://192.168.1.106:9100"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[23]="PRINTER=HL-5250DN"
D [30/Dec/2007:13:50:01 +0000] [Job 244] envp[24]="FINAL_CONTENT_TYPE=printer/HL-5250DN"
I [30/Dec/2007:13:50:01 +0000] [Job 244] Started filter /usr/lib/cups/filter/pstops (PID 10519)
I [30/Dec/2007:13:50:01 +0000] [Job 244] Started filter /usr/lib/cups/filter/brlpdwrapperHL5250DN (PID 10520)
I [30/Dec/2007:13:50:01 +0000] [Job 244] Started backend /usr/lib/cups/backend/socket (PID 10524)
D [30/Dec/2007:13:50:01 +0000] [Job 244] Connected to 192.168.1.106:9100 (IPv4)...
D [30/Dec/2007:13:50:01 +0000] [Job 244] backendRunLoop(print_fd=0, device_fd=7, use_bc=1, side_cb=0x8048ea0)
D [30/Dec/2007:13:50:01 +0000] [Job 244] Page = 612x792; 18,12 to 594,780
D [30/Dec/2007:13:50:01 +0000] [Job 244] slow_collate=0, slow_duplex=0, slow_order=0
D [30/Dec/2007:13:50:01 +0000] [Job 244] Before copy_comments - %!PS-Adobe-3.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] %!PS-Adobe-3.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] %%Title: PPR Test Page
D [30/Dec/2007:13:50:01 +0000] [Job 244] %%Pages: 1
D [30/Dec/2007:13:50:01 +0000] [Job 244] %%DocumentNeededResources: font Helvetica
D [30/Dec/2007:13:50:01 +0000] [Job 244] %%EndComments
E [30/Dec/2007:13:50:01 +0000] [Job 244] No %%BoundingBox: comment in header!
D [30/Dec/2007:13:50:01 +0000] [Job 244] Before copy_prolog - %%BeginProlog
D [30/Dec/2007:13:50:01 +0000] [Job 244] Before copy_setup - %%BeginSetup
D [30/Dec/2007:13:50:01 +0000] [Job 244] Before page loop - %%Page: 1 1
D [30/Dec/2007:13:50:01 +0000] [Job 244] Copying page 1...
D [30/Dec/2007:13:50:01 +0000] [Job 244] pagew = 576.0, pagel = 768.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] bboxw = 612, bboxl = 792
D [30/Dec/2007:13:50:01 +0000] [Job 244] PageLeft = 18.0, PageRight = 594.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] PageTop = 780.0, PageBottom = 12.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] PageWidth = 612.0, PageLength = 792.0
D [30/Dec/2007:13:50:01 +0000] [Job 244] Wrote 1 pages...
D [30/Dec/2007:13:50:06 +0000] [Job 244] File 0 is complete.
I [30/Dec/2007:13:50:06 +0000] [Job 244] Completed successfully.
D [30/Dec/2007:13:51:07 +0000] [Job 244] Unloading...

Revision history for this message
Best Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#11

Yes, both:
tail -f /var/log/cups/error_log
&
tail -f /var/log/cups/access_log (Every time you do something through the Printer Configuration tool you should see accesses here).

are good to do in two separate terminal windows.

However, instead of editing /etc/cups/cupsd.conf directly,
GOTO System-> Administration -> Printing
and under the Server tab check the box marked "Save Debugging information for Troubleshooting".
This probably does something similar but I get a more detailed output than you reported. It's also safer & easier.

You should see something like:
D [31/Dec/2007:13:01:09 +1000] [Job 67] Read 8192 bytes of print data...
D [31/Dec/2007:13:01:09 +1000] [Job 67] Wrote 8192 bytes of print data...
repeated numerous times. This is CUPS getting its info from the spool and sending it to the printer.

Regarding the line:
E [30/Dec/2007:13:36:07 +0000] [Job 239] No %%BoundingBox: comment in header!
I don't get this (but I don't have access to a HL5250 at present). The "E" at the start is for "error". I don't get any E's in my printer logs. My equivalent bounding box line looks like:
D [31/Dec/2007:13:01:08 +1000] [Job 67] %%BoundingBox: 0 0 595 842
Not sure what to think of this yet. Will put some further thought into it.

My suggestion is to start from scratch. Delete the printer using the Printer Configuration tool. "Completely uninstall" both Brother drivers using Synaptic. Start the process again and get the printer working with the Foomatic driver before proceeding to the Brother drivers again.

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#12

One further thought.

You could try booting from the Ubuntu Live CD & setup the printer from there. This would verify that it's not your installation or some other strange setup causing the problem. To access the Brother drivers when running from the Live CD you will need to mount the relevant hard drive partition or copy the drivers to some removable medium such a USB memory stick before you boot into the Live CD.

Revision history for this message
Dan Connolly (connolly) said :
#13

Thanks Gareth Fitzworthington, that solved my question.

Revision history for this message
Nick (morrownr) said :
#14

While the discussion was interesting my concern is actually getting the driver that is included as the recommended Brother driver fixed. Where can we report this issue?

Revision history for this message
ericw (ewasylishen) said :
#15

Hi, I've been having this problem too (HL-5250DN connected via ethernet, Ubuntu 7.10, Brother HL-5250DN BR-Script3 driver)
It seems to happen when I print a PDF in Evince with an image. I just printed a PDF generated from latex, and it printed fine up until the first page with an image.
I'll try out the brother driver.

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#16

Yes, this is a known issue with the Foomatic BR-Script3 driver set. This driver appears to have a rendering issue when printing graphic content via the GTK Printing API. The Brother Drivers as discussed above don't have this issue. The issue with the Foomatic drivers is currently being addressed.

If you don't want to change to the Brother drivers, you can still print from xpdf or acroread (Adobe Acrobat Reader) without being affected by this issue because these programs don't use the GTK Printing API.

Revision history for this message
Dan Connolly (connolly) said :
#17

> Yes, this is a known issue with the Foomatic BR-Script3 driver set.

What's the bug number for that issue? I'd like to link it to this support issue.

Revision history for this message
Gareth Fitzworthington (mapping-gp-deactivatedaccount) said :
#18

Dan,
Launchpad bug is now: Bug #175449

Also note: Hardy release in a few weeks will include Brother drivers in Multiverse:
http://packages.ubuntu.com/hardy/brother-lpr-drivers-common
(see listings under similar packages).

Revision history for this message
Mike McNally (m101) said :
#19

I have this problem printing from Adobe Acroread and evince both. The same PDF file generates the same error no matter which of the two I print from. The same PDF printed from Acrobat on Windows works fine (to the same printer).

This is in Karmic. I've always had this problem.

Revision history for this message
wch (winston-stdout) said :
#20

This problem still happens for me with Ubuntu 12.04, using the BR-Script3 driver.

When I did:
  apt-get install brother-cups-wrapper-laser
and then used the "HL5240 for CUPS" driver, it worked. Note that this driver is listed separately from the standard HL-5240.