Created
April 23, 2019 23:03
-
-
Save yangl1996/6a4fa7b3e0ecf0a5755b23d50ba57b0c to your computer and use it in GitHub Desktop.
Print slides in 2-up format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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