milind wrote: > Also I am using setEncyption method shown here which is > deprecated. Any advise how should i use it with 2.0. > > writer.setEncryption(PdfWriter.STRENGTH128BITS, readerPwd, sOwnerPwd, > PdfWriter.AllowPrinting); > which is setEncryption(boolean,string,string,int).
When you get a deprecated warning, check the API docs: http://itext.ugent.be/library/api/com/lowagie/text/pdf/PdfWriter.html In the case of setEncryption it says: use the methods described in the PdfEncryptionSettings. Go to this interface, and you'll find the proper method to set the encryption: http://itext.ugent.be/library/api/com/lowagie/text/pdf/interfaces/PdfEncryptionSettings.html This interface was introduced because different classes had setEncryption methods, but the order of the parameters was different depending on the class you were using. This was confusing. By letting all the classes with a setEncryption method implementing the PdfEncryptionSettings interface, you have a more uniform approach. br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
