CIS Unix: Printing

This document discusses the different ways to get your files printed out on paper.

Printing to Student Computing Cluster Printers with lpr

You can use the lpr command to print to printers in the Student Computing Clusters (SCC). You can either print text files, or PostScript files.

The syntax for the lpr command is:

lpr [-P printername] filename...

where printername is either scc (for black and white printing) or clusters_color (for color printing), and filename… represents a list of one or more filenames you want printed, separated with spaces. If you don't use a -P option, the scc printer is used.

Jobs sent to the SCC printers initially go to a holding disk on the SCC servers. You can obtain your printout by using a copy card in the appropriate cluster. Copy cards can be purchased from the self service vending machines in any of the clusters. Your output will be printed once your card is debited.

Some examples: to get “quick and dirty” of the text file poli.c:

% lpr -P scc poli.c

To print the PostScript file file.ps:

% lpr -P scc file.ps

You can use the a2ps command to get “nice” listings. For example, to print the text file poli.c:

% a2ps poli.c

a2ps has numerous options for adjusting the output; give the command

% man a2ps

for the complete story.

Printing PDF

Adobe's “Portable Document Format” (PDF) is a popular method of distributing high-quality documents on the Internet. The Adobe Acrobat Reader software (acroread), which is installed on all our Unix systems, can be used to convert PDF files to PostScript for printing. Example usage:

% acroread -toPostScript file.pdf | lpr

This might work to print out a PDF file in color:

% acroread -toPostScript colorfile.pdf | lpr -P clusters_color

But I haven't tried that myself. Let me know if you do.

The Acrobat Reader documentation describes other options to the acroread command.

Miscellaneous Printing Notes

Printing to a local printer with lpansi

If you have a “local” printer available to you (one that prints documents directly from your desktop machine) you might be able to use the lpansi command on the Unix login servers (Fermat or Newton) to print Unix text files. The command syntax is:

lpansi filename...

Your computer's communications software needs to support so-called “ANSI printing codes” in order for this to work; some do, some don't. For Windows users, PuTTY works fine.

In addition, Pine has the option to set up an “attached-to-ansi” printer; if ANSI printing works for you, you can use this option to print messages from within Pine.


Page Maintenance:
Paul A. Sand <pas@unh.edu>
Last modified: 2012-05-09 1:23 PM EDT
[W3C Validator]