Hi,
I have 2 secured PDF which I want to merge:
PdfReader reader = new PdfReader(new FileInputStream("password.pdf"));
reader.consolidateNamedDestinations();
Document doc = new Document(reader.getPageSizeWithRotation(1));
PdfCopy w = new PdfCopy(doc, new ByteArrayOutputStream());
doc.open();
w.setViewerPreferences(PdfWriter.PageModeUseOutlines);
PdfImportedPage page = w.getImportedPage(reader, 1); //<=== Exception
With iText 2.0.5 I get this exception:
java.lang.IllegalArgumentException: PdfReader not opened with owner password
at com.lowagie.text.pdf.PdfReaderInstance.getImportedPage(Unknown
Source)
at com.lowagie.text.pdf.PdfCopy.getImportedPage(Unknown Source)
OK, I expect this.
But with iText 1.4 it works! Hu? Why that?
Thank you.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php