Alex Symeonidis wrote:
>
> /* chapter03/HelloWorldEncryptDecrypt.java */
> PdfEncryptor.encrypt(new PdfReader("HelloWorldNotEncrypted.pdf"),
> new FileOutputStream("HelloWorldEncrypted2.pdf"),
> "Hello".getBytes(), "World".getBytes(),
> PdfWriter.AllowDegradedPrinting,
> PdfWriter.STRENGTH128BITS);
>
> Does this stuff really work?
> It shows me that
> PdfWriter.AllowDegradedPrinting,
> PdfWriter.STRENGTH128BITS
> are deprecated.
>
> Any advice how this could be solved?
That's explained in the Javadocs:
AllowDegradedPrinting has been replaced with ALLOW_DEGRADED_PRINTING,
STRENGTH128BITS has been replaced with STANDARD_ENCRYPTION_128,
BUT: STRENGTH128BITS is a boolean and STANDARD_ENCRYPTION_128 is an int,
so you'll need one of the other encrypt methods.
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/