| Printing with Unix |
First thing's first, learn the names of all the Math Department printers, so that you can print to any of them easily. By the way, all printers print duplex (doublesided) by default.
Location Printername floor 3, floor 4,...,floor 8 3, 4,.., 8 (respectively for long duplex printing) 3sd, 4sd,..., 8sd (respectively, for short duplex printing) 3s, 4s,..., 8s (respectively, for single-sided printing) 213 (color printer) hpc 214 (wide 11x17 format) hpwx 101A a B127 b 101 c Now, set your default printer to the printer you will be printing to most of the time. To do this, place this line in your .login file (use an editor for this):
setenv PRINTER printername
Note that long duplex printing is the default mode. Long duplex means that your job is printed on both sides of the page in portrait mode with the pages tumbled over the long edge. Short duplex means that your job is printed (landscape mode) on both sides of each page but the output is tumbled over the short edge.
If you want to temporarily change the default mode for printing, type
lpr -PN filename
where N=Printername (for example N=5,5sd or 5s if you want to print in various modes on the 5th floor).
Print Quotas and Charges
Each user is allowed to print up to 250 free B&W pages per month. You will be charged 5 cents per page for pages exceeding your quota (rounded down to the nearest dollar). Color prints cost 60 cents per page with no free pages. Unused pages cannot be carried over to the next month. If you want to check how many pages you have printed so far this month, type pages on any unix computer in the Math department.
Converting to PostScript
Now, to use the Math Department printers, it is important that you remember to convert any file you want to print into a postscript file first, and then print that PostScript file.
- To convert a text file to PostScript, type
a2ps -o output.ps input
- To convert a DVI file to PostScript, type
dvips -o output.ps input.dvi
lpr output.ps- To convert an HTML file on the web to PostScript, on the Netscape menu bar click File: Save As, and select PostScript for Format for Saved Document.
- To convert a PDF file to PostScript type
pdf2ps input.pdf output.ps
You can also run Adobe Acrobat (type acroread), open your PDF file and use the Print option from the pulldown menu.- To convert a graphics file (JPEG, GIF, PNG, etc.) to PostScript, use Netscape or, better yet, GIMP. In Netscape
type file:/grad (or staff or fac) /username/filename in the URL window
If you want more control over your image (to resize it, rotate it, warp it, etc.) use GIMP (type gimp in a terminal window). After opening your image with GIMP, right click on it for options. For instance to save it as PostScript,
Click File: Print: Print to Fileright click on the image, click File: Save As: Determine File Type: PostScript
Postscript Files
Basics. To print a Postscript file to your default printer, either open the file up in Ghostview (type gv) and click File: Print, or open a console (terminal) window and type
lpr filename.ps
If, instead, you want to print it to another printer, typelpr -Pprintername filename.ps
Tricks. There are a number of useful psutility programs that allow you to reformat PostScript files, namely epsffit, psselect, pstops, psmerge and psresize. To find out more about these, type man command, where command is the particular comand you're interested in. Here we include just one example of one of these: psnup. To put N logical pages onto each physical sheet of paper, type
psnup -N filename.ps
lpr filename.ps
Checking the Print Queue and Cancelling Print Jobs
To check the status of your print job on your default printer, type
lpq
To check the status of your print job on a different printer, typelpq -Pprintername
To check the status of all jobs sent to all printers, typelpstat -t
The output from lpq or lpstat will contain a line with your print job number. If the you want to cancel the job and it is on your default printer, type
lprm jobnumber
If you want to cancel the job and it is on a different printer, typelprm -Pprintername jobnumber
Postscript tricks
We have installed postscript utilities - commands which allow you to change how you print the postscript file
myfile.ps
Here are some more examples:
Application 1:
Suppose you want to save paper by converting a postscript file so that it will print in 2up (2 pages per sheet) landscape mode. You can do this to myfile.ps as follows:psnup -2 < myfile.ps > myfile2.ps
Then print the result with
lpr -PNsd myfile2.ps
Variation-Use this to print 4 landscape pages on one sheet: (the -l stands for landscape)
psnup -4l < myfile.ps > myfile2.ps
Application 2: If you want to make a booklet out of myfile.ps, try this:psbook < myfile.ps > myfile2.ps
psnup -2 < myfile2.ps > myfile3.ps
lpr -PNsd myfile3.pswhere N is your floor number (e.g. N=3..8)
Application 3:
If you want to make a letter-sized output.ps file out of an A4-sized input.ps file, so that it can be printed nicely by a letter printer, try this:
psresize -Pa4 -pletter input.ps output.ps
You can type man CMD where CMD = psnup, psbook, etc. to find out more about any of these commands. Here is a list of some other postscript utility commands:
lpr output.ps
- ps2ascii
- ps2pdf
- psmerge
- psselect
- psset
Look at the man pages for these commands to find out more about them.