|
Some of the printers in General Labs are charged by the page.
Personal Print Quota information can be found on https://intranet.cecs.pdx.edu. You can print on lab printers if your Balance is positive. (Detailed information on printing policy may be seen at http://www.cat.pdx.edu/students/printing.html.)
On Linux or Solaris machines you can use the command /usr/local/bin/printquota.
To print, use the lpr command:
lpr —Ppname ‹file1› ‹file2› . . . ‹fileX›
This command will send the specified file or files to the printer designated by pname. For example, to print out the file motd (message of the day) to printer fab6019bw1, use the command:
lpr —Pfab6019bw1 /etc/motd
Link to the List of Printers
Printing from UNIX Applications
In general, each application will have a specific way to print. That way may or may not be obvious. You may need to specify the printer. You may need to select a printer from a menu. You may need to perform a screen capture, save to a special kind of file, or import into another application before printing the file from the command line.
As normally configured, our laser printers are capable of printing plain text and Postscript files. If your file is not in one of these formats, you will have to convert it. Conversion utilities are built into many of the applications. Directions may also come from tutorials, instructors, teaching assistants, or the help pages in the applications that have them.
Non-postscript images can be converted to postscript by means of the tools in the image-toolz package. Some applications such as xv and Netscape can send images to be printed without conversion.
The Print Queue
When the command to print is issued, a copy of your file is sent to the printer and stored in a queue in the order received. If you feel that your job is taking a long time to print, you can list the jobs in the print queue by using the lpq command.
lpq —Pfab13501bw1
lpq displays the queue for printer lw3. Below is an example of what the queue might look like.
Printer: fab13501bw1@sirius ‘CS lab LaserJet 4M+, MSB 120’
Queue: 1 printable job
Server: pid 16915 active
Unspooler: pid 16918 active
Status: opening ‘fab13501bw1.cs.pdx.edu’ at 21:30:31, attempt 1,
Rank Owner/ID Class Job Files Size Time
active joeuser@sirius+912 A 912 lake2.JPG 113063 21:30:31
Here, we see that there is only one job in the queue. The “job id” is 912. If this job contained an error or if it was stalled, then the “Rank” field would say “error” or “stalled” instead of “active”.
To cancel a print job that is yours:
- Execute the lpq command described above to get the job id number.
- Execute the lprm command:
lprm —P[printer] JOBID
Using the syntax shown above, if your job id was 912, you could cancel the job by typing:
lprm —Pfab13501bw1 912
Executing the lprm command may generate the following output:
Printer “fab13501bw1@sirius”:
checking ‘piman@sirius+912’
checking perms ‘piman@sirius+912’
dequeued ‘piman@sirius+912’
killing subserver ‘16918’
The job 912 should be destroyed now.
If there are no print jobs in the specified printer when the lprm command is given, the following output is generated:
Printer: fab13501bw1@sirius ‘HP LaserJet 4100dtn, FAB 135-01’
Queue: no printable jobs in queue
Status: server finished at 21:30:45
Printing Multiple Pages on a Single Sheet of Paper:
To print multiple pages on a single sheet use either the mpage or psmulti command.
mpage – print multiple pages of text per sheet on a PostScript printer.
psmulti – used to print Postscript files (.ps) that fit multiple pages on a single sheet of paper.
NOTE: Currently, mpage can only be used for text files. If it is used on PostScript files it will stall the printer.
|