How to remove a .pdf's document restrictions?

0

2

I need to remove some restrictions from a .pdf document:

enter image description here

I can't zoom or use any other buttons. The toolbar just isn't available. I never saw a .pdf file like this one.

ChristianM

Posted 2010-11-14T09:46:03.603

Reputation: 655

Question was closed 2015-02-10T04:02:16.433

You can try this if the PDF has permission pswd => gswin64c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sFONTPATH=%windir%/fonts;xfonts;. -sPDFPassword=123456 -dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true -sOutputFile=OUTPUT.pdf INPUT.pdf – dns – 2015-11-04T13:23:20.730

1Point us to a PDF link if you want a remotely useful answer. – Mike Fitzpatrick – 2010-11-14T11:53:21.287

If the PDF is protected, there's very little you can do to unprotect it. – None – 2010-11-14T21:02:35.937

Answers

2

You have two options:

  • with ghostscript:

    gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -c .setpdfwrite -f locked.pdf > unlocked.pdf
    
  • with pdf2ps and ps2pdf (slower):

    pdf2ps locked.pdf - | ps2pdf - unlocked.pdf
    

    If the unlocked PDF contains error, try to decompose the commands (ps2pdf have sometimes problems with a streamed input):

    pdf2ps locked.pdf unlocked.ps
    ps2pdf unlocked.ps unlocked.pdf
    

Kyle_the_hacker

Posted 2010-11-14T09:46:03.603

Reputation: 121

Alternatively => gswin64c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sFONTPATH=%windir%/fonts;xfonts;. -sPDFPassword=123456 -dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true -sOutputFile=OUTPUT.pdf INPUT.pdf – dns – 2015-11-04T13:22:44.927