I have several PDF documents which have the "no copy" and "no print" restriction bits set. Are there any free tools for removing such restrictions, on Linux?

(Please do not suggest pdf2ps | ps2pdf; the size increase is horrible. The originals are fairly large too, so I'd rather use a local tool than a website.)

link|improve this question

62% accept rate
Willing to write any code or are you wanting something out of the box? – Aaron Dec 12 '11 at 15:08
Code is okay, although I have a feeling it'll be C, and my C skills are limited to "Hello world". – grawity Dec 12 '11 at 15:13
You could use iText; itextpdf.com/itext.php this can be done in Java. – Aaron Dec 12 '11 at 15:30
feedback

3 Answers

You can probably use pdftk. Something like

pdftk in.pdf output out.pdf allow AllFeatures

should do the job.

link|improve this answer
1  
This would work if the password is known. – Scott McClenning Dec 13 '11 at 2:39
feedback

If you've got ghostscript installed try simply:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -c .setpdfwrite -f locked.pdf > unlocked.pdf
link|improve this answer
feedback

FOSS-wise, there is PDFCrack, not sure if it does actually remove the security though, it's just a password cracker. I generally turn to some free trial software, A-PDF Restrictions Remover, it's easier to use.

It might be a lot harder if it's a recent PDF version though, I think they really increased the security recently.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.