Ricardo Matos <ricardo.matos <at> link.pt> writes: > > Ricardo Matos <ricardo.matos <at> link.pt> writes: > > > - With something like this, I can add the "hiding" attribute to the > > nodes I want > > and have a xmldoc with the xml I need. My question now is: how do I "inject" > > these changes to the Stamper? How can I set my stamper, so I can close it > > and > > have the result I wish in my output pdf file? > > > > I tried using MergeXfaData, SetXfa, ... but with no results. I just can't > > find a way to do it. > > Ok. Forget it! I've found the answer! > > Just had to use, in the end: > xfaForm.SetXfa(stamper.Writer); > > I had tried the setXfa function...but apparently the wrong way! ;) After getting the "hiding" part to work, I need to remove the exceeding pages. If I only need 3 of 10 repetitive table blocks, for instance, I end up getting blank pages.
Thus, in the "hiding" part of my function, I grab the original pdf template and produce a temporary pdf file with a bunch of hidden tables. This works perfectly. Then, I grab that temporary file and I try using a PDFCopy object to simply copy the useful pages to a final output pdf. Example: I know that I want 3 repetitive elements and I have two of them per page, so I need to copy only the first two pages. The problem is that the resulting output pdf shows the previously hidden tables! :| Should I use another object other than PdfCopy? Is something missing between the two function parts? ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
