Ghostscript 不尊重 PDF 安全权限

Ghostscript does not honor PDF security permissions

我需要保护一组将在网页上向用户公开的 PDF 文件。 PDF 应该只允许阅读,没有其他权限应该是可能的。

我使用 pdftk 创建了 "secured" PDF,我已经在各种浏览器中对其进行了测试。到目前为止,一切都很好。

pdftk input.pdf output protected.pdf owner_pw <PASSWORD_GOES_HERE> 

但我的一位同事向我指出了一种使用 Ghostscript 8.70 可以取消保护的方法:

ghostscript -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unprotected.pdf -c .setpdfwrite -f protected.pdf

这是否意味着 Ghostcript 不尊重安全权限?

我想尝试使用证书签名,但我发现这也可以规避:http://ronin-group.org/misc_pdfsignatures.html

在网页中提供 PDF 内容时,如何真正保护内容免受用户访问?

"How to genuinely protect the content from PDF from users when serving them in web pages?"

你不能。