Skip to content | Change text size

ITS home

 

Linux Printing Tips

NOTE: filenames in italics should be replaced with the names of your own files.

How do I print multiple pages of a PostScript document on one single page?

psnup -2 doc.ps | lpr

  • The 2 is how many pages will be on each sheet.
  • | lpr sends the document to your default printer.
  • You can also output the document to a new file using
    psnup -2 doc.ps doc2.ps

How do I print a few pages from a large PostScript document?

psselect

  • This command allows you to pull out certain pages from a PostScript document. The example below prints pages 1, 2, 4, 5, 6, 7 and 9 from myfile.ps:
    psselect -p1,2,4-7,9 myfile.ps | lpr

How do I print A4 sized PostScript documents on letter sized paper?

psnup -Pa4 -1 filename.ps | lpr

  • You can also output the document to a new file.
    psnup -Pa4 -1 filename.ps filename2.ps

How do I check on the status of my job?

Use the lpq command.

How do I delete a stalled job?

Type lprm to find out the names of the jobs you own.

  • To delete a particular job, type:
    lprm user@host+123
    where user@host+123 is the name of your job
  • To delete all your jobs, type:
    lprm all

My printout looks weird.

If you used the lpr command to print anything except PostScript and Text files, your layout will look very strange.  This includes PDF files.

If you wish to print files in another format using the lpr command, you must first convert the file to PostScript.  See the Troubleshooting section for instructions on how to do this.

right arrow Back to Linux Printing Index


Troubleshooting Linux Printing

Changing a file to PostScript

If the file you tried printing is incompatible with the printer, you can try changing your file to a PostScript file first.

To do this, use the a2ps command.
e.g.: a2ps filename.txt >filename.ps

My text is running diagonally along the page!

This may happen when you open a file that was originally created in DOS, and it is incompatible with UNIX.
You can try the dos2unix command to fix the file format problem before printing again.
e.g.: dos2unix -n myfile.txt myfile.unx

I still can't print my PostScript files.

Try printing your PostScript files in Windows.  For instructions on how to do this, please see:
right arrow http://www.its.monash.edu.au/staff/systems/linux/technical/linux-winprintps.html