Friday, February 5, 2010

scan to pdf

here are a handy pair of commands that help convert scanned images to a pdf document: in python [os.system('convert -rotate 90 HP00%02d.jpg p%02d.pdf'%(i+1,i)) for i in range(1,15)] using the pdfjam package pdfjoin *.pdf
be careful, tho: pdfjoin will hang if you call it on files that have spaces in their paths (even if those spaces are not in the command line).
(in case i ever need it later) pdfjoin uses pdfpages with this macro:
\includepdf[pages=-,fitpaper=true,trim=0 0 0 0,offset=0 0,turn=true,noautoscale=false]{/var/tmp/5663150830922source1.pdf}

No comments: