About Us Documentation

Contact Site Map
 

  

WinPak
Documentation

GNU Ghostscript
	NOTE: this file was contributed by a user: please contact
	George Cameron 
	if you have questions.

Help on setting up an lpr filter for Ghostscript
================================================

OVERVIEW:

 "How do I set up Ghostscript to provide postscript queues in a standard lpr
 environment on Unix systems" appears as a Frequently Asked Question amongst
 Ghostscript users, and the following utilities are designed to make this
 task a little easier. The files supplied are:

 unix-lpr.doc:	this file
 unix-lpr.sh:	a flexible, multi-option print filter shell script
 lprsetup.sh:	a shell script which sets up soft links and creates a
		template insert for the printcap file


WHAT IT CAN DO:

 The print filter resides in the standard Ghostscript installation directory
 (eg. /usr/local/lib/ghostscript), together with a dummy filter directory
 containing various soft links which point to the filter. It offers the
 following features:

	o  Multiple devices supported by a single filter
	o  Multiple bit-depths for the same device
	o  Direct (single-queue) and indirect (two-queue) setup
	o  Support for the standard preprocessing filters if you have the
		corresponding (whatever)-to-postscript translators
	o  Redirection of diagnostic and programmed output to a logfile in 
		the spooling directory
	o  Maintaining of printer accounting records of the numbers of pages
		printed by each user (compatible with the 'pac' command)
	o  Straightforward editing for further customisation


SETTING IT UP:

 The lprsetup.sh script needs to have two lines edited before running, to set
 the printer devices to use and the list of filters available. With this
 information, it will:

	o  Create a 'filt' subdirectory of the standard Ghostscript
		installation directory
	o  Create the links in this directory which enable the filter to
		determine the parameters for running Ghostscript
	o  Automatically generate printcap entries which should need only
		a little editing before adding to your system printcap file


EDITING THE DEVICE LIST:

 At the top of lprsetup.sh, you will find a line of the form DEVICES=" ... ".
 This should be edited to replace the example list with your own list of 
 devices, with each entry comprising the name of the device, follwed by two
 optional additional fields, separated by dots.

 The first field is only required if the printer device understands the
 qualifier -dBitsPerPixel=.., which only applies to colour devices (and at
 present is only supported by the cdj* and pj* family of printers). For
 a particular number  of bits per pixel, add the suffix . to the
 device name, eg. cdj500.3 cdj500.24 etc.
 The second field is required if you wish to use two separate queues for the
 device, a 'raw' queue as well as the postscript queue (see discussion below).
 If this is required, you should add the suffix .dq ('dual-queue') to the name,
 whether or not a bits-per-pixel suffix has already been added.

 Thus, the following list supports a cdj550 device at 3 different bit-depths
 (24 bpp, 3 bpp and 1 bpp), with a dual-queue (ie. separate queue for the raw
 data); a monochrome deskjet device with a single queue; and a djet500 device
 using a separate queue:

 DEVICES="cdj550.24.dq cdj550.3.dq cdj550.1.dq deskjet djet500.dq"

 
EDITING THE FILTER LIST:

 The standard list contains only the generic 'if' filter, although there
 is a commented-out list showing the other filters which you may have 
 available. If you wish to use the support for these filters, you may
 need to edit the bsd-if file to add the directories where the translators
 are stored to the PATH, or to change the names of the filters if yours
 are different.  The bsd-if script is supplied with an example setup
 using Transcript (a commercial package from Adobe), and PBMPLUS, a PD
 package by Jeff Poskanzer and others.


MODIFIYING THE PRINTCAP.INSERT:

 Running the lprsetup.sh script generates a file called printcap.insert, which
 has a template setup for your printer queues. It cannot guarantee to do the
 whole job, and you will probably need to consult your system documentation
 and edit this file before you add it to your printcap file. The file has
 been set up for serial printers, as these most often cause problems in 
 getting binary data to the printer. The setup is not guaranteed to be
 correct, but it works on my system! You may well need to change the baud
 rate, or the hardware/software handshaking used. Only a small change is
 required to edit the printcap to use a networked remote printer instead of
 a direct serial printer, and an example is given in the printcap.insert file.


SINGLE OR DUAL QUEUES:

 If you wish to provide a postscript-only queue (eg. so that all pages
 printed go through the accounting!), and the printer port is local to the
 host machine, a single queue is appropriate - Ghostscript simply converts
 the postscript into the printer's native data format and sends it to the
 port. If the printer is on a remote networked machine (another workstation,
 or a PC), or if you need to send raw printer data to the printer, you will
 need to use two queues. Simply specify the '.dq' option above.


BUGS:

 You will need write access to the ghostscript installation directory (eg.
 /usr/local/lib/ghostscript) in order for lprsetup.sh to create the filt
 directory and soft links.

 You must list all instances of a device (if you have multiple bits-per-
 pixel for the same device) as adjacent items in the device list - if you
 do not, the printcap.insert will contain multiple entries for the same
 device.

 Multiple instances of the same device are not supported at present.

 

Email addresses listed on this site may  NOT be used for unsolicited commercial email.

Ready-to-Run Software, Inc Privacy Statement

Portions (c)Copyright, 1996-2005 by Ready-to-Run Software, Inc
(All rights reserved.)
212 Cedar Cove
Lansing, NY 14882
Phone: 607 533 UNIX (8649)
Fax: 607 533 4002