Solved Brother BR-script3 vs Ghostscript/pxlmono

Well, the Brother HL-5450DN showed up at NewEgg for 100USD (A one day special) so I took the plunge. I initially set it up with lpr, Brothers Postscript3 ppd and foomatic-rip. There were 2 issues:
1) The minor, easily fixed issue was the Brother ppd default papersize was a4.
2) The more challenging issue was that graphics in pdf files were not rendered. Some internet searches indicated that others had this issue.

I read that print/ghostscript uses graphics/ImageMagick for image processing and began to wonder if BR-script3 possibly could be using MSWindows or MacOS/X applications for imaging processing.

For the moment, I switched my print filter from foomatic-rip to the pxlmono driver. Using the pxlmono driver, images embedded in pdf's, duplexing and resolution settings all work fine. I've yet to play with the MP tray. I get printer status using a web interface to the local IP address.

The usual recommendation is to use postscript/postscript-emulation if available. Am I missing something with BSD image processing via BR-script3.ppd?
 
There are a lot of variables. If the documents being printed are text and the PS interpreter in the printer is good, print speed can be faster than using Ghostscript and then dumping a bitmap. If the documents are bitmaps, conversion to PS can make them substantially larger, taking more time to send to the printer.

If you are really concerned, it can be benchmarked. But if the printer PS interpreter can't render the documents correctly, there is not much point.

The problem with graphics is likely just a bug in BRScript. It might be that they only tested it with graphics generated on a particular platform (Windows) and those graphics are generated with some assumptions that are not true for other platforms.
 
It does seem to be a bug. I tried this fix but the script died. I'm having real good results with the pxlmono driver although for future lpr users, I would recommend not paying the extra money for a BR-script3 capable printer unless you know your just going to be printing text.

Edit: I was able to get brother based postscript to work. Even images. The ppd's I downloaded from brother had the issues. The one I generated with foomatic-db, using the Brother entries in the foomatic database, worked fine.
 
Last edited:
  • Thanks
Reactions: Oko
That same preprocessing could be done with ps2ps(1), which comes with Ghostscript. Your computer is probably much faster than the printer, so converting it that way might still be faster than sending PCL bitmaps. It can be done transparently with just an input filter.
 
Well, the Brother HL-5450DN showed up at NewEgg for 100USD (A one day special) so I took the plunge. I initially set it up with lpr, Brothers Postscript3 ppd and foomatic-rip. There were 2 issues:
1) The minor, easily fixed issue was the Brother ppd default papersize was a4.
2) The more challenging issue was that graphics in pdf files were not rendered. Some internet searches indicated that others had this issue.
Great choice and even better buy!!! I have HL-5250DN. My printcap entry

Code:
rp|HL-5250DN:\
  :lp=9100@192.168.3.15:\
  :if=/etc/foomatic-rip/script_brother.sh:\
  :sh:sd=/var/spool/output:\
  :lf=/var/log/lpd-errs:

And this is that infamous script hack which is needed as foomatic-rip are no longer supporting LPD

Code:
#!/bin/sh

/usr/local/bin/a2ps -BRq --columns=1 -o - | \
  /usr/local/bin/foomatic-rip -P HL-5250DN --ppd /etc/foomatic-rip/direct/brother-hl-5250dn-postscript-brother.ppd

I think I also had to fix A4 paper issue (hopefully one of these days U.S. will adopt international standards and metric units)

However I had no problem with graphics. Arguably I am using HL-5250DN to print scientific papers with little graphics but I have not seen what you are describing on this older model. I print graphics rich content on WorkForce 845 (via OS X) due to the fact that EPSON open source driver has hidden binary blob.


I read that print/ghostscript uses graphics/ImageMagick for image processing and began to wonder if BR-script3 possibly could be using MSWindows or MacOS/X applications for imaging processing.
I strongly prefer graphics/GraphicsMagick over ImageMagick (please search the Internet for GraphicsMagick vs ImageMagic story.


For the moment, I switched my print filter from foomatic-rip to the pxlmono driver. Using the pxlmono driver, images embedded in pdf's, duplexing and resolution settings all work fine. I've yet to play with the MP tray. I get printer status using a web interface to the local IP address.

The usual recommendation is to use postscript/postscript-emulation if available. Am I missing something with BSD image processing via BR-script3.ppd?

If pxlmono driver works OK for you I would stick with it. I mean my desktop has 8 cores and 16 GB of RAM (and my wife wants to upgrade to 32GB) it is not like you have to count those CPU cycles.
 
It does seem to be a bug. I tried this fix but the script died. I'm having real good results with the pxlmono driver although for future lpr users, I would recommend not paying the extra money for a BR-script3 capable printer unless you know your just going to be printing text.
That is a good printer! Don't feel bad that you stumbled on to the bug. There is nothing wrong with your set up.
 
Hi shepper. Like you I bought a nice Brother printer on sale from NewEgg, the HL-3170CDW with BR-script3 support. I have also had some issues which I am not entirely sure of the cause.

I have both print/ghostscript9-base and graphics/xpdf installed mainly for their pdf2ps and pdftops to use as filters.

I had to print a shipping label a few days ago that was an image. First I used Firefox print to file postscript which produced a blank page when printed.

Then I used Firefox print to file pdf and converted it to postscript using pdf2ps (from ghostscript) which produced a printed page that was all messed up. The image looked shifted and stretched all down the page.

Then I converted that same pdf using pdftops (from xpdf) and that finally produced a usable printed page.

I also tried printing some random pdfs I have and xpdf's pdftops won every time compared to ghostscript's pdf2ps which was a mixed bag, printing either a blank page or a very distorted one.

Whatever difference these three have when making postscript files and how the printer interprets them I have no idea. Brother says their BR-script3 is fully compatible with the postscript specification.

I have not tried to convert an image outside of Firefox and pdftops yet, however I have the feeling we will have to jump through a few hoops to get reliable prints. Darn them for having these printers on sale!
 
  • Thanks
Reactions: Oko
It prints in color just fine. The printer autodetects color in the data and prints it in color unless I tell it not to. I don't actually have much need to print in color but I couldn't pass up the price for a color laser printer and it's nice to have on the occasions I do need to print in color.

Thank you for your offer but right now I have several projects going on at once. I usually work out solutions when a need arises, but having information is always a plus. I don't plan on using cups unless there is something i can't print without it, so I am going to stick with lpr for now.
 
I skimmed your post just before the dinner bell and overlooked some important details in your post. Nice to know that there is another option to convert pdf to ps. My goal was to avoid pre-processing my print jobs. Ghostscript based print/gv displays both ps and pdf files. When I display a pdf with images in gv, it rendered correctly but when I sent pdf via BR-script3 I also had a blank page. Didn't matter if I sent it via the command line or the gv print selection. With the pxlmono filter, I do not have to pre-process ps or pdf's.

I read on a Fedora Forum that gtk3 based apps will only print to pdf or via cups and the maintainer indicated they had no intent of continuing lpr support - print/xpdf and print/gv will need to be zealously supported by those of us using lpr.
 
Oko
#!/bin/sh /usr/local/bin/a2ps -BRq --columns=1 -o - | \ /usr/local/bin/foomatic-rip -P HL-5250DN --ppd /etc/foomatic-rip/direct/brother-hl-5250dn-postscript-brother.ppd

This looks like you generated your own ppd using [FONT=Book Antiqua]foomatic-ppdfile with generic postscript? It also sounds like that ppd file meets your needs.

I was hoping that BR-script3 would give me better tray selection, toner density, duplexing etc. Do you use these features on your setup? Do you need to do any pre-processing?[/FONT]
 
Oko


This looks like you generated your own ppd using [FONT=Book Antiqua]foomatic-ppdfile with generic postscript? It also sounds like that ppd file meets your needs.

I was hoping that BR-script3 would give me better tray selection, toner density, duplexing etc. Do you use these features on your setup? Do you need to do any pre-processing?[/FONT]

No I pulled out brother-hl-5250dn-postscript-brother.ppd from foomatic-db which is now the part of CUPS filters package (at least on OpenBSD). This is the folder

/usr/local/share/cups/model/foomatic-db-ppds

The above script is just a cheap hack as foomatic-rip no longer wants to accept jobs from LPD queue. The first line in that script is calling a2ps which as you know is filter which parses the file and calls appropriate filter to convert it to PostScript before sending it to foomatic-rip. For example if I send image.jpeg to printer
a2ps will recognized that it is an image file so it calls ImageMagick (in my case replaced with GraphicMagick) to convert to PostScript. That PostScript stream goes now through foomatic-rip which sees based on PPD that my printer is PostScript capable so it just adjusts the size of PostScript stream (margins to fit Letter size and similar) and sends it to my Brother printer.

If the printer was not PostScript capable foomatic-rip would send the PostScript stream to the driver first converting into the steam understandable to printer. That is all.
 
No I pulled out brother-hl-5250dn-postscript-brother.ppd from foomatic-db which is now the part of CUPS filters package (at least on OpenBSD).

Thanks. I'm also using OpenBSD 5.8 and foomatic-db does not have an entry for the hl-5450dn. The hl-5250dn should be close, but I'll check the db to see if there is anything newer/closer.
 
Using lpr, I managed to get BR-script working using foomatic-rip and a foomatic-db generated *ppd. Images print fine with this ppd. One confusing issue was that the ppd needs unix end-of-line sequences (^M).

I set up 4 different print queue's: 600dpi/simplex, 600dpi/duplex, 1200dpi/simplex and 600dpi/landscape#10Envelopes.
 
Last edited:
Back
Top