Skip to main content.

2006-Nov-29

My Brother 5150D printer would not print some pages from a PDF I converted to postscript. So I decided to try a PCL driver to see if that would change anything. First I downloaded the Brother-HL-5140-pxlmono.ppd PPD file (as suggested and linked from the linuxprinting.org webpage -- which said use 5140 docs for PCL).

pxlmono is part of ghostscript. When I run "gs -h" it lists it as one of the "Available devices".

To create a PDQ driver declaration file from it, I ran:

foomatic-rip --ppd ~/printing/Brother-HL-5140-pxlmono.ppd   --genpdq ~/.pdq/Brother-HL-5140-pxlmono.pdq
My pdq configuration (~/.printrc) already use "try_include" to include this directory to see that "pdq" config file.

Then I ran "xpdq". (xpdq will not start of you have the ppd file in the "try_include" directory as it assumes it is a pdq configuration and it is not.)

I chose Printer -> Add Printer. And clicked "Next" in the wizard. I gave it a name (Brother-PCL), entered the model name and the printer location. The list of print drivers had around 23 choices. Some were in highlighted in pink (**what does that mean??). I chose the last entry which I had just created with foomatic-rip (it is not the file name but a name found in the pdq file): "Brother-HL-5140-Foomatic-pxlmono-1164853456". You can click "Info" button on the wizard to read a description of the driver selected, but in my case it had no description.

The next wizard display listed parameters, but it was empty. (**why??) I clicked "Next". The interface dialog lists: appletalk, bsd-lpd, efax, local-port, and tcp-port. I chose "local-port" which is for serial or parallel. On next dialog, I entered the device name "/dev/lpt3". I had already made sure that device had the correct permissions (and I have a group called "printer" I use). dmesg tells me my printer is "lpt3". Then it was done with that wizard.

By selecting the new printer in xpdq and choosing the "Configure Driver" you get the "Driver Options" menu, you can set the printout mode (draft, normal, high quality), page size (which has many choices), the media source (like default tray or manual feeder), GSResolution (default from printer, 300dpi, 1200x1200, etc), JCLResolution, color mode, resolution, and print driver usage information (**what is that??).

Choosing the "Configure Interface" menu allows setting End of file handling (EOF) and selecting the name of device (which I already set).

Running pdq from command line like:

pdq -P Brother-PCL -h
lists created pdq options for the printer, such as "-oInputSlot_Manual" to use the manual feeder. (See the .pdq file created earlier.)

So I tried printing to it, and it failed -- xpdq said "aborted" under the Status. So I highlighted the job, and clicked Job -> Show details to get a window with logging details. It said:

Error 14 compiling regex pattern.
Don't know how to print this type of file:
PostScript document text conforming at level 3.0
I have had that "compiling regex pattern" error before. Note I have a custom pdq normally it would not print the "14". And would fail at that first error. ***TODO*** fix pdq or fix foomatic-rip. **** The pdq file created by foomatic-rip has:
language_driver all {
# We accept all file types and pass them to foomatic-rip
# (invoked in "filter_exec {}" section) without
# pre-filtering
filetype_regx ""
...
The fix is to not have an empty expression, so:
filetype_regx "."
(to match any character). I am using NetBSD which may have different regex() than this was designed for. ***TODO fix that too.

So I tried my test again. xpdq said "filtering" and then "sending (try 1)".