Skip to content

Instantly share code, notes, and snippets.

@jzhou77
Last active February 22, 2024 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jzhou77/a2300a4d02e43c1938012b72dcdfbb46 to your computer and use it in GitHub Desktop.
Save jzhou77/a2300a4d02e43c1938012b72dcdfbb46 to your computer and use it in GitHub Desktop.
Use open source QPDF:
$ qpdf --decrypt input.pdf output.pdf
And the restrictions were removed. Note that the original PDF was not password protected.
Another way of using ghostscript:
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -f INPUT.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment