logo
Jiff Slater
🤔 About
✍️ Contact
📚Knowledge
30 Jul 2021
These articles have been archived. You may find them useful but I am no longer offering support for them. Check out my latest articles on plkt.io.
Printing to a remote printer
2 November 2009

Every now and then I’ll enter the computer lab only to find that all the computers are being used – this usually happens when I urgently need to print something before I miss the bus.

Thankfully, the system admins have allowed me the wonders of ssh access. So, printing is relatively simple:

Copy the file to be printed to the server.

scp filename.pdf username@server:.

List all available printers.
lpstat -a

Send your document to the printer.
lpr -Pprinter filename.pdf

Optionally, to save paper, you may print multiple pdf pages on one sheet.
The process is simple: convert the pdf to ps (postscript), use the psnup utility to increase the number of pages placed on each sheet, then convert the pdf to ps.

pdf2ps filename.pdf
psnup -n2 filename.ps (or 2up filename.ps to get two pages per sheet)
ps2pdf filename.ps