Sunday, October 26, 2008

Discovering QPDF

A friend of mine asked for help removing the restrictions on a PDF file he made a while ago. It seems he misplaced his original source file because of disk bloat and all that was left was a PDF file he created for the print shop. Of course, he couldn't remember the password he had used when he created the file.

A quick look through google came up with a simple solution: qpdf, available in universe:

QPDF is a program that can be used to linearize (web-optimize),
encrypt (password-protect), decrypt, and inspect PDF files from
the command-line.

Here's the command line that removed the PDF restrictions:

qpdf --decrypt infile.pdf outfile.pdf

No comments: