Simple Wake-on-LAN Wrapper Script
Our home network includes a number of Linux-based systems and one Apple iMac. Because the Mac hosts all of our family photos, and because printing from a Mac to a Linux printer is a headache, it made the most sense for us to connect the printer directly to the Mac. However, this creates an issue when printing from one of the other computers: if the Mac is asleep, the shared printer does not respond to requests.
Printing in Booklet Format from the Linux Command Line
Here is a Linux command to take a PDF of half-letter-sized pages (5.5"x8.5") and arrange them, two pages per side, for booklet printing:
$ pdftops -level3 source.pdf - | psbook | psnup -2 -W5.5in -H8.5in | ps2pdf - booklet.pdf All of these utilities are standard on a Debian-based system. Several filters are tied together using pipes to produce a properly-formatted PDF.
A Closer Look Here’s a pipe-by-pipe breakdown of the command: