work-work.work-logo: A man with brains and a shovel

work-work.work

A blog about goals and obstacles, motivation and procrastination, life's random events and getting things done.

Remove PDF Protection

Sometimes I get write protected PDF files. There are colorful programs and apps I could install to modify them. On macOS, I use ghostscript in the commandline to liberate the file. This example takes a file called encryptedfilename.pdf and creates unencrypted.pdf.

$ gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
  -sOutputFile=unencrypted.pdf \
  -c .setpdfwrite \
  -f encryptedfilename.pdf