Q: The printer says its out of paper or toner. What do I do?

If a printer is out of paper (the hoppers are empty and there no packages of new paper to be found near the printer), then a fresh package or box of paper can be fetched from the mail room. Before you take some paper, please notify the Font Desk Receptionist so that the inventory can be kept up to date. If possible, please take an entire box so that this tiresome exercise need not be repeated often.

If the printer reports in the LCD window that it is low on toner, then what to do depends on how fresh this message is. The toner sensor is very conservative and will report "Low Toner" even though there is plenty of life left. To ascertain whether the toner is really running out, print a test page. If the printout is getting very light or has bald patches, then open the printer, shake the toner cartridge, reinsert the cartridge and print a few test pages again. If it comes out spotty again, then it's time to change ther printer cartridge.

Contact the IT staff to replace the cartridge.

Q: How do I cancel a printing job?


     lprm -Pprinter JobID

     lprm -    [remove all your submitted jobs.]


     lprm -Plj4 316

Q: How do I print a postscript (ps) file or a text file?


lpr -Pprinter(s) filename


lpr -Poptra example.ps [to print double sided.]

lpr -Poptras example.ps [to print single sided.]

Q: How do I mark or unmark consecutive pages in gv or ghostview?

Just drag right-button of the mouse.

Q: How do I print several pages per sheet?

You can use command a2ps. For example, if you have a text file called input.txt and you want to print the file 4 pages per sheet, then you can use the following command to generate an output file called output.ps, then use lpr command to print the output.ps

a2ps -o output.ps -4 input.txt
lpr -Pprintername output.ps

Note that

  • a2ps convert FILE(s) or standard input to PostScript. Input files can be of different type, e.g. .txt, .ps, or .html.
  • you can directly print out the input file to printer by the following command:

    a2ps -P -4 input.ps

    However we recommend to convert the input file to output.ps first, then use ghostview to check if the format is correct or not. Finally use lpr command to print output.ps.

  • For further information, please use command man a2ps to read the manual of the command a2ps.
Q: Someone has sent me a print-ready file formatted for A4 paper. What do I do now?

A4 format is commonly used in the rest of the world, so it's not surprising to receive DVI or Postscript files from there. If you try to print in on our printers which are set up for Letter size (8.5"x11"), you may end up with less than satisfactory results.

If you have the TeX/LaTeX source, you can change the source to use the new format and run TeX/LaTeX again.

You can also resize the Postscript output (if you have a DVI file, convert it to Postscript first), by issuing the command

  psresize -PA4 -pletter in.ps out.ps 

and print the resulting file out.ps.

If this is for publication that requires it to be on A4 paper, you can buy A4 paper from the UBC Bookstore. Ask the IT staff on how to set up the printer to print on A4 paper.

Q: How do I print a dvi (DeVice independent) file?

Convert dvi file to ps file then use lpr command to print the converted ps file:

dvips -o outputfilename.ps inputfilename.dvi

lpr -Pprintername outputfilename.dvi

Or pipe it through directly:

dvips filename.dvi | lpr -Pprintername

Q: How do I set the printer that my print jobs should go to?

As of Dec. 1, 2005, if you do not set the printer your printouts should go to, it will be thrown away. The method to set your printer is different for Windows and Unix (Linux or Solaris).

For Windows

  1. Setting a printer for an individual print job

    Most Windows applications will allow you to choose the printer from a menu when you try to print something. Choose the appropriate printer.

  2. Setting a printer for a session

    To set a default printer for a login session (i.e. this setting will be forgotten once you log out), you can go to the printer settings control panel:

    Start -> Settings -> Printers

    then bring up the printer menu by placing the mouse over the printer's icon you want to print to and right-click, then select

    Select As Default Printer

    A check mark should appear over the printer icon of your choice.

  3. Setting a permanent default printer for a workstation

    To set a permanent default printer (for the workstation you are using: you'll have to repeat it for another workstation), go to

    Start Menu -> Run ...

    Then, type the following into the text input window:


    Then double-click the appropriate printer batch file. From then on, that will be your default printer for this particular workstation.

For Unix

  1. Setting a printer for an individual print job

    Some application (like firefox) will allow you to choose the printer. Most printing is done from the command line via lpr. You can tell lpr where to send the output to via the -P switch:

    lpr -Pname file ...

  2. Setting a printer for a login session

    To set a default printer for a login session (i.e. this setting will be forgotten once you log out), you can set the environment variable PRINTER. In tcsh (the default shell), you can enter

    setenv PRINTER name

  3. Setting a permanent default printer for your MathNet Unix account

    To permanently set a default printer for your Unix sessions, you can enter the above command to set your PRINTER environment variable in your startup script, found in your home directory:


Q: How do I check printing status?


     lpq -Pprinter


     lpq -Php5

Q: How do I use 'enscript' to print a non-text or non-ps file?


First use acroread to open the file. Then use acroread's "print" menu.


First use Firefox to open the file. Then use Firefox's "print" menu.

For text files, you can first convert them to ps files before you print them. You can use Unix command "enscript" to do this. Enscript converts text files to PostScript and spools gen- erated PostScript output to the specified printer or leaves it to file. If no input files are given, enscript processes standard input. Enscript can be extended to handle dif- ferent output media and it has many options which can be used to customize printouts (Use command "man enscript" to find more information).


enscript [options] filename


         -1, -2, --columns=num
                 Specify how many columns each page have.  With  long
                 option  --columns=num  you  can  specify more than 2
                 columns per page.

         -a pages, --pages=pages
                 Specify which pages are printed.  Page specification
                 pages can be given in following formats:

                         print pages from start to end

                 -end    print pages from 0 to end

                 start-  print pages from start to end

                 page    print page page

                 odd     print odd pages

                 even    print even pages

         -A align, --file-align=align
                 Align separate input files to even align page count.
                 This  is  handy  for  two-side  and  2-up  printings

         -b header, --header=header


          enscript foo.txt
                  Print file foo.txt to the default printer.

          enscript -2 foo.txt
                  Print file foo.txt to two columns.

          enscript -2r foo.txt
                  Print file to  two  columns  and  rotate  output  90
                  degrees (landscape).

          enscript -G2rE -U2 foo.c
                  gaudy header,  two columns,  landscape,  
                  code highlighting, 2-up printing.