Skip to content

Instantly share code, notes, and snippets.

@snim2
Forked from sampsyo/pdfstill
Created June 10, 2014 16:27
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 snim2/f78174886a85fff2be2c to your computer and use it in GitHub Desktop.
Save snim2/f78174886a85fff2be2c to your computer and use it in GitHub Desktop.
#!/bin/sh
infn=$1
outfn=`basename $infn .pdf`.still.pdf
# Embed fonts.
gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfn \
-dCompatibilityLevel=1.5 -dPDFSETTINGS=/prepress -c .setpdfwrite -f $infn
# Strip metadata crap added by Ghostscript.
exiftool -Title="" $outfn
exiftool -Creator="" $outfn
exiftool -CreatorTool="" $outfn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment