pdf – iText禁用打印/复制/保存

我写了一个servlet来使用iText来提供PDF.有没有办法从浏览器端禁用打印/复制/保存?
这是a thread that provides the relevant magic API invocation.这个想法是你必须加密PDF以保护各种用户操作.

PdfReader reader = new PdfReader("my-old-file.pdf");
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("my-new-file.pdf"));
stamper.setEncryption("my-owner-password".getBytes(), "my-user-password".getBytes(),
    PdfWriter.AllowPrinting | PdfWriter.AllowCopy, PdfWriter.STRENGTH40BITS);
stamper.close();
https://stackoverflow.com/questions/1936189/itext-disable-printing-copying-saving

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:pdf – iText禁用打印/复制/保存