Managing Print Requests

Printing from our computer systems is something that usually works so well that we take it for granted. However there are times when it problems arise and they can cost us time. To help avoid severe problems, I've collected some notes and tips from Eric and students that make management of your print requests more clear and more controllable. Most of this document is for UNIX users, since that OS requires more responsibility of the user for making sure that mistakes don't happen.

First, it helps to know where the printers are, and what they are called:

Printer Name Location Comments
lj5c Second Floor Postscript/300DPI
8.5 x 11 Color
11 x 17 Black & White
lj Third Floor - IO Room Postscript/HPGL/300 DPI
Black & White
lj3 Third Floor - IO Room Postscript/Paintjet
Color
lj2 Third Floor - North Postscript/HPGL/600 DPI
Black & White
lj1 Third Floor - South Postscript/HPGL/300 DPI
Black and White
lj4 Third Floor - IO Room Postscript/HPGL/1200 DPI
Black & White

Commands For Print-Request Management

lp, (old command is lpr, but lp is preferred)

Use the command lp to send the material to be printed to the printer. But remember, you can't send just anything to the printer. Sending a binary formatted file of numbers will not work - you have to convert what you want printed to a "language" that the printer can interpret (e.g. postscript, hpgl, etc.). Usually you should first convert a text file to postscript using "a2ps". For example, suppose that I had a text file that I wanted to print. The command to issue is







a2ps my_text_filename | lp

which will send the text to printer the default printer (you set your default printer by setting the LPDEST or PRINTER environment variable). If you had a color postscript graphic that you wanted to print on the color printer you have to specify that the destination of the print job is the color printer using the "-d" option. You would execute







lp -d lj5c my_postscript_filename

lpstat (old command is lpq, but lpstat is preferred) & cancel (old command is lprm)

Sometimes things go wrong and you have to cancel one of your print requests. To remove a print request (also called a "print job") from a printer que you use the cancel command. To identify your job you must first find out what "job number" the UNIX system has assigned to your request. Once you know that, you can cancel the job. To find our the list of jobs you use the lpstat (list printer que) command. If you are not using your default printer you have to supply the name of the printer to lpstat:







lpstat -o -d lj5c

Here's an example where I am printing a color map to the color postscript printer lj5c:







mantle:58% lp -d lj5c map.ps request id is lj5c-6259 (1 file(s)) mantle:69% lpstat -o all lj5c-259 mantle.eas.slu.edu!ammon 3284030 Dec 02 08:17 on lj5c

Note that print job includes the printer name. To cancel that print job, which causes problems on the color printer, you must use the cancel command (and you must issue the command from the same computer that you used to send the print request).







mantle:78% cancel lj5c-259 request "lj5c-259" cancelled

That's it for basic print-request management. What follows are some more complex comments on using the printers.

Selecting a tray on (lj5c)

At times it is necessary to print some material on a specific media such as high-quality paper, transparencies, color paper, etc. From the Macintosh computers it is easy to select a particular tray on the computer (it's a menu in the page setup or print dialog). The same choice is available from UNIX, but you have to be more familiar with the intricacies of postscript, and you have to edit the graphics file.

If you are comfortable with postscript, you can change some of your graphics files to select a special tray on the printer. If we agree that the front tray(s) will be for standard paper, then users can place special media (paper, transparencies, etc.) in the rear tray with less chance that someone will send a print request which will disrupt your plans, while you are heading back to the computer, after loading their special media. Be considerate, if the rear tray has glossy/color/heavy stock/letterhead/etc. in it, and something is printing, don't put your media in the rear tray. We should install a dry-ink board placed in the room so that you can tell people you are running some special print jobs to the rear tray.

To select the front tray you don't have to do anything, it's the default. To select the rear tray, you need to add some postscript commands to your file. I have run a test where I placed the following just before the graphics content in a simple postscript file:







<</DeferredMediaSelection true /MediaPosition 1 >> setpagedevice

The front tray is /MediaPosition 0, the rear tray is /MediaPosition 1. You must prepend the setpagedevice command (place it before your graphics content). I suggest that you put a color sheet of paper in the rear tray while you are working out exactly how to change your graphics files. That's an easy way to figure out what tray the printer is using without being there to watch.

Here's the test postscript file I used:







%! % % Select the rear tray % <</DeferredMediaSelection true /MediaPosition 1 >> setpagedevice % % A convenient definition % /inch {72 mul} def % % draw a single line % newpath 1 inch 1 inch moveto 4 inch 4 inch lineto stroke % % Print a test string % 1 inch 6 inch moveto /Helvetica findfont 20 scalefont setfont (This is a test) show % showpage

I haven't tested this, but in theory, you can also specify the size of the paper and the printer If you want the graphic to be printed on tabloid (11 x 17 inch) paper, you can prepend:







<< /PageSize [792 1224] /MediaPosition 0 >> setpagedevice

The printer will pause before printing until you load the tabloid tray in the front of the printer.


Top | CJA's Guide Index | Ammon's Home | Department of Geosciences
Prepared by: Charles J. Ammon,