如何从受密码保护的PDF文件中删除打印保护?

Mil*_*loš 6 linux pdf password-protection

如何从受密码保护的PDF文件中删除打印保护?

Mil*_*loš 14

当PDF文档可见但不可打印时,使用GNU/Linux时可以轻松解决.

为此,您必须使用两步程序:

  1. 将pdf打印到postscript
  2. 恢复正常的pdf文件

    $ pdftops [your_protected_pdf_document.pdf] out.ps
    
    $ pstopdf [out.ps] broken_protection_pdf_document.pdf 
    
    Run Code Online (Sandbox Code Playgroud)

它已经完成了.您的pdf文档不再有密码保护.

  • 实际上,从PDF文件中删除否定权限的破坏性方法较少.您的解决方法会破坏文档的交互功能.如果您只需要一种打印PDF的方法,那就没问题了,如果有其他禁止的权限,则不是您想要的. (2认同)

ret*_*eto 7

见答案:

pdftk 和 qpdf 重置 PDF 评论安全

复制自其他答案(写为 bei Kurt Pfeifle)

The command qpdf --decrypt input.pdf output.pdf removes 
the 'owner' password. But it does only work, if there is 
no 'user' password set.

Once the owner password is removed, the output.pdf should 
already have unset all security protection and have allowed 
commenting. Needless to run your extra pdftk ... command then... 
BTW, your allow paramenter in your pdftk call will not work the 
way you quoted your command. The allow permissions will only be
applied if you also...

    ...either specify an encryption strength
    ...or give a user or an owner password

Try the following to find out the detailed security settings of the file(s):

qpdf --show-encryption input.pdf
qpdf --show-encryption output.pdf
Run Code Online (Sandbox Code Playgroud)

例子 :

qpdf --decrypt crypted.pdf --password=myP@sswor!D uncrypted.pdf
Run Code Online (Sandbox Code Playgroud)