|
The following code makes a copy of an existing PDF and applies certain permissions to it. See the PdfWriter class for the various permissions that are possible.
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();
__________________
Have fun....
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|