Hello all, after searching Google for the past two days and not able to find any relevant information, hence this post.
1) Created a pdf form using Adobe Livecycle designer 9.
2) It is a dynamic form with textboxes and a table configured to repeat rows dynamically.
3) Testing form using xml data within designer works just fine.
Need to populate form dynamically using data from database.
Found iTextSharp (free assembly) which assists with populating existing pdf form.
This assembly works without any issue when populating textfields (see sample code below). The problem I am facing is with the dynamic table where in I am not able to reference rows greater than 1. Since the pdf template contains a table with just one row referencing the first row using acrofield works.
I was under impression since this is a dynamic table with repeat enabled, in asp.net if I referenced row2 onwards the table would grow automatically. Which I have come to realize is not going to be possible.
So I am looking for ideas on how I can accomplish this. I wish this could have been a fixed row table then reference rows would have been easier. However in this situation the table has to be dynamic.
Any ideas thoughts would be appreciated.
Below is my sample code:
PdfStamper ps = null;
// read existing PDF document
PdfReader r = new PdfReader(
// optimize memory usage
new RandomAccessFileOrArray(Request.MapPath("itext.pdf")), null
ps = new PdfStamper(r, Response.OutputStream);
// retrieve properties of PDF form w/AcroFields object