We have three printers in the department that are available for general
printing. They are named
nhp (the default printer),
cm. The first is located in the computer room (Rm 223) on the second
floor while the last two are located in the Xerox machine room (Rm 116) on
the ground floor. All the printers are PostScript printers and so files
must be converted to PostScript for printing.
Update May 99 We have reactivated the old HP printer
it is now in the PC lab. You may access it from the PCs. In addition,
Trevor has kindly donated his printer
lj4 and it is in the Xerox
Note that only PostScript and text files can be printed.
12.1 Printing using
lp on RGMiller, Girshick
On these two machines, the native printing command is
To print a file, use
rgmiller% lp foo.ps
This will print to the default printer
nhp (for New HP)
which is located in Room 223. If you want to be explicit, you can also
specify the printer name via
rgmiller% lp -dnhp foo.ps
lp commands will give you an identifier that can be used to
refer to your jobs in case they jam the printer, or if you want to
cancel the printing. More on that below.
Other printers that can be specified in place of
nhp are the laser
lw and the color printer
cm (both are located in the
Xerox machine room).
Sometimes, one might wish to save paper by not printing a header
RGMiller there is an ugly option to do this:
rgmiller% lp -dnhp -o"-nobanner" foo.ps
You can look at the status of the print queue for a particular printer
rgmiller% lpstat -dnhp
To get a list of all jobs queued on the printer
rgmiller% lpstat -olw
To get a list of all jobs on all printers, use
rgmiller% lpstat -o
To cancel a print job, use the command
rgmiller% cancel <job_id>
job_id is your job number obtained from the output of
For more information, please see the man pages for
12.2 Printing using
lpr printing commands are well-supported only on
Playfair. I have been unable to get the SGI software satisfactorily
lpr on the new printer
nhp even after hours of experimentation.
To print a PostScript file on our systems, say
foo.ps to the
rgmiller 1% lpr -Plw foo.ps
rgmiller 2% lpr -Plw -h foo.ps
The only difference between the two commands is that latter saves
paper by not printing a header page. To use other printers, substitute
lw by their respective names above.
Note that some of our old printers have a tendency to get stuck. If
so, you can remove your job from the queue using the
lprm commands. The command
rgmiller 4% lpq -Plw
will return a list of jobs queued to the printer
lw. Note the
job number of your print job and type
rgmiller 5% lprm -Plw <job_number>
lprm one can cancel all of one's jobs in one shot:
rgmiller 5% lprm -Plw -
For more information, see man pages for
12.3 After Sending Your Print Job
It is courteous to remove your hardcopy promptly instead of leaving it
lying at the printer. If you suspect that the printer is not
responding to your print job, check the status of your job using the
lpstat commands explained above. If the printer is jammed, or low
on toner, or otherwise not responding, cancel your print
job---don't leave it in the print queue! Do not send the same job more
than once without cancelling earlier requests.
If you experience printer problems, please seek help. To simply walk away
from the printer when it is in a bad shape and not tell anybody about it
is inherently abusive.
If you experience printer problems, please send an e-mail to
, hktang@stat or jiang@stat stating
- what you were trying to do;
- what seemed to be happening;
- what you did in response.
You will be contacted to see how we can avoid this problem in the future.
12.4 Printing Tips
- Save paper by printing without a banner page:
rgmiller% lp -dnhp -o"-nobanner" file
file with the name of the file you wish to print. To avoid
typing this command all the time, you may alias it by adding the line
alias xxx 'lp -dnhp -o"-nobanner"'
.mycshrc file, replacing
xxx with an alias of your
choice, and then using
xxx as a short form for the full
command. See the faq
- Save paper by printing multiple pages per physical page. The
psnup can help you cut the number of pages
you print by putting multiple columns/panels per page. They are
particularly useful for printing that odd e-mail message or two, long
computer codes, WWW pages and presentation handouts.
enscript on ASCII (text) files. With the
-2r option, two
columns are printed per page in landscape mode. Some examples:
rgmiller%enscript -2r -dnhp infile
rgmiller% enscript -2r -o outfile infile
# Write to outfile
# (PostScript file)
# instead of printing
psnup on PostScript files. The
-2 option puts two panels
per page in landscape mode. To get four panels per page (e.g., for
presentation handouts), replace the
-2 option with
|rgmiller% psnup -2 infile outfile}
rgmiller% psnup -2 infile | lp -dnhp -o"-nobanner"
||# Write to outfile
# Print to new HP
infile with the input filename and
outfile with the
output filename, as necessary.
In Netscape, change the print command to:
psnup -2 | lp -dnhp
-o"-nobanner". This prints two panels per page in landscape mode.
The instructions below were initially written for our old SGI server and have now some updates for our
new Linux systems. So be sure to read the details carefully.
Most of the printers we purchase these days for department-wide can print duplex.
The printer upstairs ("nhp") prints in duplex mode by default. This is
(now) set in the software that drives the printer. There are two types
of duplexing you can do with the printer.
bindLongSide---this is what you'd want if you are going to
bind or staple the document on the longer (11-inch) side of the
paper. This is the default since most of us expect to turn pages
bindShortSide---if you want to bind the document on the shorter side
(8.5-inch) side. In this situation, you'll be flipping the pages up
(like those yellow notepads) instead of left.
These options can be explicitly invoked with the
lp command as shown
in the following examples, in which the banner page is turned off;
-o"-nobanner" is the same as
rgmiller% lp -dnhp -o"-nobanner" -o"-duplex bindLongSide" foo.ps
rgmiller% lp -dnhp -o"-h" -o"-duplex bindShortSide" foo.ps
miller.stanford.edu and other modern linux machines, use
miller% lp -dnhp -o sides=two-sided-long-edge foo.ps
miller% lp -dnhp -o sides=two-sided-short-edge foo.ps
Other options on
miller.stanford.edu include landscape mode, number-up etc. Please refer to the CUPS User Manual for details.
To turn off duplexing (desirable for theses, etc.) use:
rgmiller% lp -dnhp -o"-nobanner" -o"-duplex off" foo.txt
All of the above commands apply to text and PostScript files.
Note that the lpr command on
rgmiller.stanford.edu does not provide control over duplexing!!!
All stuff sent to nhp using lpr gets printed duplex. This is not true for modern Linuxes such as the one
- Printing a PostScript file in "non-standard" sizes.
If you have a PostScript file that was sent to you with a paper size
different from the normal "letter" size, you may face printing
problems. Here is how one can print a PostScript file created in A4
paper size (that the Europeans commonly use) to the American letter
rgmiller% psnup -Pa4 -pletter european.ps american.ps
-P option specifies the native size of the file and
-p specifies the output size; in the above example, the input file is
european.ps and the output is
12.5 Setting Up Printers
12.5.1 Department Printer Map
There are five main HP laser printers available for public use in the department. Below is a summary table for these printers.
||Printer IP Address
||HP LaserJet 4200dtn PCL (Duplex)
(Room 223, 2nd Floor)
||HP LaserJet 4200dtn PCL (Duplex)
(Room 211, 2nd Floor)
||HP LaserJet 4100 PCL 6 (Duplex)
(Room 116, 1st Floor)
||HP Color LaserJet 5500DN PCL/PS
(Room 116, 1st Floor)
||HP LaserJet 4/4M Plus PS 600
(Room 116, 1st Floor)
To set up any of these above printers for use on Windows, please follow these detailed instructions or an analogous set of instructions.
12.5.2 Setting Up Printers within Statistics Domain
Note: If you wish to set up printers on a personal laptop, please follow the instructions in the links mentioned in the previous sentence, or equivalently in the next section.
If you are using a Windows workstation within our Statistics domain (e.g., an office or lab PC), it is very convenient to setup a network printer from above
table on your machine per user account and you don't actually need the administrator previledge to do that. Just simply follow these steps:
- Log into a Windows workstation using your Windows account login
(it should be the same as your UNIX one). If you don't have one yet,
send request to .
- Click "Start" button, then "Settings" and then "Printers".
- Select "Add Printer" and it will bring the "Add Printer Wizard" to you.
- Click on "Next".
- Select "Network Printer" and click "Next".
- Do not type anything, just click "Next". The diaglogue box coming up
will show you the network printers available to you.
- Currently, for example under the "Statistics" domain, you should see
the following printers:
HP Color LaserJet 5500 PCL 6 (or PS) corresponds to the color printer
in the copy room. HP LaserJet 4100 PCL 6 and LJ4 are also in the copy
room, sitting on the desk next to the copier. nhp is the major printer on
the second floor which students use most often. hplj4 is in the PC lab on the second floor. However, it has been disconnected.
- \\STAT-NT-SERVER\HP Color LaserJet 5500 PCL 5c
- \\STAT-NT-SERVER\HP Color LaserJet 5500 PCL 6
- \\STAT-NT-SERVER\HP Color LaserJet 5500 PS
- \\STAT-NT-SERVER\HP LaserJet 4100 PCL 6
- Select the printer you want to setup and then click "Next".
- The "Wizard" will ask you whether to use it as your default
printer. Do whatever you like and click "Next".
- This completes the Setup wizard and the newly added printer will
show up in your printers folder and be available to use.
12.5.3 Setting Up Internet Printers (for Visitors)
Sometimes, the computer you are using can't access the department domain. For example, if you are a visitor to the department, then your laptop (or desktop PC)
won't be granted such access. But you can still use the department printers as in above table by setting up appropriate TCP/IP (Internet) ports on your computer.
Detailed instruction about setting up such internet printers can be found
here or at this link. However, please note that you do need an administrator right
to do this.
12.6 Setting Up Printers
on MacOS X
12.6 Printing on MacOS X
Setting up printers on the new Macs is quite easy. Click on System Preferences, Select Print and Fax. You will get a dialog. Click on the + sign to add a printer. A dialog will pop up as below.
First make sure, you choose
HP Jet Direct as the Protocol.
Then, using the information supplied in Department Printer Map, either enter the Printer DNS or the Printer IP address in the
address field. (We have entered
stat-hp-5500dn.stanford.edu in the
example above.) MacOS X automatically figures out the printer and the driver
to use. Click Add to add the printer.