Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Print slides in 2-up format
#!/bin/bash
# requires pdfjam from MacTeX, install thru tlmgr
for filename in "$@"
do
echo "Laying out $(basename $filename)"
outpath="$(dirname $filename)/$(basename $filename .pdf)_layout.pdf"
pdfjam $filename --nup 1x2 --outfile $outpath &> /dev/null
echo "Output written to $outpath"
lpr -P "CSAIL_G9_Xerox" -o sides=two-sided-long-edge $outpath
echo "Job sent to printer"
rm $outpath
echo "Deleted layout result"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.