Using Ghostscript as a print filter for the Minolta Pageworks 12/20 Laser Printers


Back in Mar '99, David A. De Graaf filed a ghostscript bug report of a "ljet4 blemish" with his new Minolta PageWorks 12 printer. L. Peter Deutsch promptly reported his tests revealed no such problem with his H-P LaserJet 6P. However, Bob Lindell reported the same problem with his PageWorks 20. These printers print an ugly vertical line(s) along the right margin. An image of the blemished page is presented here. Further investigation suggests a firmware error in Minolta's decompression algorithm. We have developed a solution using standard Postscript language attributes along with new support in the Laser Jet driver.

The PCL Logical Page

PCL provides the ability to define a logical page which can be shifted and rotated relative to the physical page boundaries. The definition of the logical page from the Brother's HL-Series manual is:

Logical page - The area of the physical page on which the cursor can be positioned in LaserJet mode. You can use PCL commands to specify the position of the logical page on the physical page. Also known as the PCL addressable area.

It is our understanding, given the Brother's documentation, that the printable area of the page is the intersected area of the logical and physical page. The printable area of the physical page is additionally reduced by the unprintable hardware dependent margin areas. To maximize the printable area, it is important to adjust the logical page to provide maximal intersection with the (margined) physical page.

There may be slight variations in printing engine page alignment between individual printers and the logical page offsets could be used to compensate for this variability as well.

The offset of the logical page is specified with two PCL commands: left long-edge offset registration and top offset registration. The offsets can range from -32,727 to +32,767 in units of decipoints (1/720 of an inch).

The Ghostscript PCL5 driver

The Ghostscript PCL5 driver (gdevdjet) defaults the left long-edge offset registration to -180, shifting the logical page 1/4 inch to the left of the physical page. I assume this value was chosen empirically to provides close to maximal printable area for the HP LaserJet family of printers. It is clear, from the discussion above, that there cannot be a default value for offsets that is optimal for all printer implementations and unit variations.

The Minolta Pageworks 12/20 Printers

The Minolta Pageworks 12/20 printers claim to emulate the PCL5e language. When Ghostscript is used as a PostScript print filter for this printer, two problems arise. First, the default left long-edge offset registration of -180 is too large and creates a larger than acceptable right margin. Second, a bug in the firmware of the Minolta printer sometimes generates thin vertically printed lines at the rightmost margins of the page, occurring outside the area of the logical and physical page intersection. By definition, this area of the page should be unprintable but a bug in these printers generates spurious output in this region.

By choosing an optimal left long-edge offset registration for the given Minolta printer model, both problems are corrected. The right margin is minimized and the spurious output is suppressed. Empirically, the correct values for the Minolta Pageworks 12 model is -107 and for the Pageworks 20 model it is -60.

Changes to Ghostscript

We added support for /MediaSource to the base interpreter as well as changes to the PCL and Laser Jet driver to support /Margins and tray selection. This patch has been submitted for code review to the ghostscript development team.

A code review by the ghostscript development team pointed out that I accidently moved the /Priority key from the /InputAttributes dictionary to the page device dictionary. This has been fixed in the patch for ghostscript-7.00 and the printer description files below (4/2001)

Patch for Aladdin Ghostscript 7.00
Redhat Linux 7.1 RPM for Aladdin Ghostscript 7.00
Redhat Linux 7.1 source RPM for Aladdin Ghostscript 7.00

Minolta PageWorks 12/20 Example Printer Description Files

The contents of minpw12/ is likely to be the same across all printer spool destinations for the same printer. The contents of would change for a given spool name to reflect the default paper and/or tray selection. (save to file) (save to file)

Issuing PJL Commands

Without the generation of at least a trailing PJL UDEL command, a printer that supports PJL may consider the print job pending even after it has completed. The net result is that the printer will not go into power save mode.

All PJL options for a PageWorks 20

Redhat Linux 7.1 Installation

Here is something that will work, but I'm not very happy with it. Eventually, there should be a way to pass down the postscript printer descriptions from the spooler into mfomatic.

First, unless you want to figure out how to rebuild the "striped pickle printer db" for the Redhat "printool", I would just modify an existing printer description. I modified the description of a Minolta PagePro 8 to work for my Minolta PageWorks 20. In the file, /usr/share/printconf/foomatic/data/, make the following changes:

Patch "mfomatic" to correctly output PJL after setting "'pjl' => 1," in the foomatic printer description.

Patch for Redhat Linux 7.1 mfomatic

Finally, use the -Z options in lpr to select the media. Here is an example of using different spool destinations to set the media type:



Redhat Linux 6.x/7.0 Installation

Appropriate values for these offsets can be configured into the spooler configuration files. Here is an example using Redhat Linux 6.x/7.0 and a Minolta Pageworks 12/20.

    EXTRA_GS_OPTIONS="${SPOOLDIR}/ ${SPOOLDIR}/" (save to file)

Here is a change to the Redhat Linux print filters to support the generation of PJL commands.

Patch for Redhat Linux 7.0 print filter
    export SEND_PJL=YES



Bob Lindell
(562) 867-4355

David A. De Graaf
Hilton Head Is., SC
843-785-3136, -3156 (fax)