Created
October 7, 2014 17:40
-
-
Save darribas/1317126af719045173b4 to your computer and use it in GitHub Desktop.
pdf2handout
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
#!/usr/bin/python | |
import os, sys | |
args = sys.argv | |
if len(args) > 1: | |
inpath = args[1] | |
if len(args)==2: | |
outpath = inpath.replace('.pdf', '_handout.pdf') | |
elif len(args)==3: | |
outpath = args[2] | |
cmd = ('pdfnup --nup 1x3 --frame true --paper a4paper --trim "0 0 0 0"' \ | |
' --delta "1cm 1cm" --offset "0 0" --scale 0.91 --openright false --column' \ | |
' false --columnstrict false --no-landscape --outfile %s %s')%(outpath, | |
inpath) | |
print cmd | |
os.system(cmd) | |
else: | |
print ''' | |
################### | |
### pdf2handout ### | |
################### | |
Create a handout version of your pdf slides, with 3 slides per sheet | |
Usage: | |
pdf2handout file.pdf | |
pdf2handout file.pdf out.pdf | |
If no second argument is passed, handout written to the same name + | |
`_handout` | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment