Op 22/02/2011 10:05, Lasantha Peththawadu schreef:
hi


here my code

Snippet 1: a regular PdfReader/PdfStamper app using setField() to fill out fields in an existing PDF.
Snippet 2: an app that creates a new document from scratch using HTMLWorker.

and my requirement is how can we add a gridview with data to the PDF.as a example we assume gridview has 3 rows.then create the textfeild for each data column and we can bind it from code.but gridview rows are dynamically increase decrease.

So you want to fill out the data in existing fields
AND you want to add the same data somewhere in the existing PDF?
Or do you want dynamic XFA functionality?

i need to put the gridview to my existing PDF file. i think my question is clear now.

No, you're question is still not clear.

You have an existing PDF with a form: is it using Acroform or XFA technology?
- if it's an AcroForm: you can't have a dynamic number of rows.
- if it's an XFA from: you can't flatten a dynamic form using iText.

If you want fill out the fields as is done in snippet 1 AND add the grid as in snippet 2, you need PdfStamper.getContentUnder() or getContentOver() and add the Element
objects obtained from HTMLWorker using the ColumnText object.
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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