Hi spring,

On 13 October 2011 16:43, <[email protected]> wrote:

> 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?
>

Something works as expected in one version, and doesn't in an older one.
I don't see the problem, that's what bugfixes are for :)

Anyway, iText 2.0.5 is 4 years old, and iText 1.4 is 5 years old.
The current version is 5.1.2, and that's the only one that is supported on
this mailing list.

Cheers,
alexis
------------------------------------------------------------------------------
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

Reply via email to