<code type="java">
try {
PdfReader reader = new PdfReader("C:\\temp\\a.pdf");
PdfStamper stamper = new PdfStamper(reader,new
FileOutputStream("C:\\temp\\aEncrypted1.pdf"));
stamper.setEncryption(
"Ciao".getBytes(), "Mondo".getBytes(),
PdfWriter.AllowPrinting | PdfWriter.AllowCopy,
PdfWriter.STRENGTH40BITS);
stamper.close();
} catch(Exception e) {
}
</code>
mercoledì 17 novembre 2010
PDF password set
From itext lowgie libraries you can set password for accessing to pdf.
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento