Op 8/11/2012 17:14, Bernie schreef:
> I am trying to create a pdf portfolio by embedding one or more pdf files into
> a "portfolio" file.
>
> When creating this portfolio file from scratch, with PdfWriter and a
> Document, the collection is set as expected. However, if I try to set the
> collection on an already existing pdf document, using PdfStamper, it does
> not work.
>
> Is this expected behavior?
If I only heard the question in words, I'd have answered no.
When looking at your code, the answer is yes:
> PdfWriter writer = stamper.getWriter();
> PdfCollection coll = new PdfCollection(PdfCollection.HIDDEN);
> coll.setInitialDocument("document1");
> writer.setCollection(coll);
The final line is wrong.
You need the makePackage() method that is available in PdfStamper.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
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