pslpr
A Ghostscript interface shell script

The pslpr script is a stone-cold stupid bash script designed to make printing Postscript files to non-Postscript printers substantially easier under BeOS.  With the xicon application (available from BeWare), pslpr will provide "drag and drop" printing of files.

What printers does it support?
In theory, it supports any printer that Ghostscript does.  "Out of the box" it is set up to handle the printers that Jake Hamby's Ghostscript port was compiled with.  These include the HP Deskjet 500, 500C, 550C, 1200C; LaserJet IIp, III, 4; Canon BJC-10e, BJC-200, BCJ-70, BCJ-800 and "BJC-4xxx" (whatever that may be), and the PaintJet, PaintJet XL, XL300 and CopyJet.

What about the DeskJet 600/800 series?
I'm using a DeskJet 600C with it and it works just fine.  I know almost nothing about the 800 series, other than a vague suspicion that they're substantially different than the 600 series.  Note that you only get 300x300 DPI on the 600 series, instead of 600x300.  (Read the "Devices.htm" file in the Ghostscript documentation for an explanation of this.)  Also, I haven't tested out anything but my 600C.  The bottom line is: if what you have is baseline compatible with the 500, 500C or 550C, it'll work.

Installation
You must have Ghostscript installed to use this, obviously.  The script is set up to expect Ghostscript to be installed in the location Jake Hamby's port normally lives in (/boot/apps/Ghostscript).  Copy pslpr to your /boot/home/config/bin directory.

If your printer is not on /dev/parallel/parallel1, you will need to edit the script with a text editor to put the proper device in the second line of the file.

If you have xicon installed, drag pslpr to the "convert to xicon" script in xicon's directory. Put a link to pslpr somewhere that makes sense to you if you'd like.  (I have a link on my desktop.)

Configuration
Just type "pslpr" from the terminal, or double-click on the icon if you have it installed with xicon.  You will get a list of printers.  Type the number of your printer and press RETURN.

Use
From the terminal, type "pslpr filename" to print the file.  If you have it installed with xicon, drag the file onto the pslpr icon.

Notes
The printer you select is stored in the file /home/config/settings/pslpr.device.

The configuration menu is, as mentioned before, stone-cold stupid and does no error checking.  Giving it a value that isn't useful will leave your configuration file in an "undefined" state and interesting things may happen when you try to use it.  (Just run it again with no options, or double-click on it, to fix this.)

If you know shell scripting, you can see that the "case" statement does all the work, and it just puts in a Ghostscript device name.  Other command-line options can be passed after the device name by modifying the appropriate line.  The "Devices.htm" file in the Ghostscript documentation directory will give you some suggestions.

Truly Random Notes
As of Release 4.5, any BeOS program that can print can create PostScript.  Just tell it to print to a file.   I originally wrote pslpr as a vaguely hackish way to give me printer support that BeOS lacked.

The BeOS Ghostscript archive appears to be missing some of the support files, notably for the uniprint driver.  Even though it's compiled with it, it can't use it.

There are extra scripts in the Ghostscript/bin directory, the most notable one of which might be "ps2pdf."  That's right, it'll make Ghostscript act as a PDF "distiller."

BeOS writes stunningly, amazingly, heartwrenchingly inefficient Postscript.  Each page is just sent out to the printer as one big honking bitmap.  My "lab rat" test Postscript document was the first page of a Gobe Productive word processing document, which is written in 12-point Courier Regular with no other font changes (other than underlining).  It is double-spaced and contains no graphics.  The PostScript for this file is 150K.  If you want to print your 300-page magnum opus using pslpr, make sure you keep fifty megs of hard drive space free.

Even so, I've noticed that for many documents pslpr prints measurably faster than the native BeOS LaserJet III driver does with my DJ600C.

An ideal extension for pslpr would to to write a version of it as a print server add-on so it appeared to be a "connection method" like parallel, USB, and so on.  That way you add a PostScript printer, say it's connected via pslpr, configure pslpr correctly, and you're off.  You'd still need the "real" pslpr to print standalone PostScript files and, if you have a printer like mine, to switch between color and black-and-white printing.  This is an extension I am probably not capable of writing even with documentation.

License
It's a shell script.  If you break this, you own both pieces.  If you fix it to make it do something cool, send me the fix, please.  If it blows up your printer, let me know so I can tell people "pslpr occasionally makes printers spontaneously combust."  If you redstribute this, the original documentation (i.e., this file) must accompany it.  If you make changes, you must add a "changelog"-type file indicating what your changes are and documenting any differences in operation.

Watts Martin
watts@ranea.org
