PDF Services for Mac OS X

Mac OS supports a neat feature called PDF Services which adds various options to the print dialog. In particular, you can set it up to do single-clink printing to a remote printer over ssh.

Why do this? Especially when you can also set up printing via the regular print dialogs, as documented in the Mac FAQ? Because PDF Services and scp works from anywhere, including wireless connections, while the lp print server on astron only seems to accept connections over the wired astronomy LAN.

How to use PDF Services:

  1. Create a folder ~/Library/PDF Services
  2. Copy the following files into that directory.
  3. Print something, anything. In the print dialog, the former "Save as PDF" button has now been replaced with a menu which includes all the items from your PDF Services directory.
For printing via ssh to work properly, you'll need to set up passwordless login to the machine you want to print from, with ssh public/private keys or the like. There's a good description of how to set this up here., though there are other ways to do it as well (such as using the SSH Keychain program.

Here are the scripts. By editing the PRINTER variable at the start of the script, you can easily create scripts for the other departmental printers.