Check your spelling, i.e., boolean result = pdfReader.isOpenedWithFulllPermissions();
Extra "l" in above. Cheers, Bill Segraves ----- Original Message ---- From: jDrinkard <[email protected]> To: [email protected] Sent: Fri, July 16, 2010 9:11:23 AM Subject: [iText-questions] Problem opening secured pdf file: Hello All, I recently had a requirement to merge two pdf files, one is secure, the other is not, but for some reason it's not working. What I'm doing is using a pdfReader as in: String password = "xyzxyz"; byte[] ownerPassword = password.getBytes(); PdfReader pdfReader = newPdfReader(inputStream, ownerPassword); but using this gives me a pdf header signature not found error. I thought maybe the format was wrong for the bytes and tried password.getBytes("Cp1252"); and others, but that wasn't it. In the ini file used by a script to create the file it has ownerPassword = "xyzxyz" I'm using this password as an example. Anyway I used boolean result = pdfReader.isOpenedWithFulllPermissions(); and on the unsecure file I get, but for the secure file I get false, which I thought meant it has a user password, not an ownerPassword? I also use pdfReader.isEncrypted(), which is true for the secure file. The header is 1.4 and it's present with no garbage before it. I'm using iText 2.1.3. I've worked with iText before, but not with secure files and I'm not sure if this is the correct api or what I'm doing wrong? Any ideas? Thanks, James -- View this message in context: http://itext-general.2136553.n4.nabble.com/Problem-opening-secured-pdf-file-tp2291344p2291344.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ 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/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ 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/
