Skip to content

Instantly share code, notes, and snippets.

@k1000
Created July 20, 2012 16:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save k1000/3151588 to your computer and use it in GitHub Desktop.
Save k1000/3151588 to your computer and use it in GitHub Desktop.
PDF DRM password removal
#remove DRM http://ubuntuforums.org/showthread.php?t=884002
gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=temp.pdf foo.pdf -c '.setpdfwrite' && mv temp.pdf foo.pdf
#remove password http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment