Skip to content

Instantly share code, notes, and snippets.

@dokipen
Created April 18, 2013 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dokipen/5415806 to your computer and use it in GitHub Desktop.
Save dokipen/5415806 to your computer and use it in GitHub Desktop.
# You'll need a copy of pcl6 (ghostpcl)
i=0
out=`git rev-parse HEAD`
rm -Rf $out
mkdir $out
cat index.html | cut -f1 | cut -d'/' -f2 | while read line; do
i=$((i + 1))
printf "making ${out}/%02d_${line}.pdf\n" $i
./pcl6 -o "${out}/${i}_${line}.pdf" -sDEVICE=pdfwrite "${line}"
done
pdfunite $out/*.pdf $out.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment