posted 13 years ago
Here's my situation:
I have some a pdf that contains a table with several rows, with each row containing an acroform textfield. In my program, I have a reader that reads this form and then a PdfStamper that will fill in data into these textfields.
However, what I don't know is how to add more rows (with textfields) to the table if I still have more data. I realize that I can create a table and its rows programmatically using PdfPTable. But ideally, what we would like to do, is to create pdf snipplets of different tables for various reports. For example, my designer can create a pdf that contains table x to be used for report 1, table y for report 2, and so forth. We would like to create these tables using OpenOffice and then in my program, I just load the corresponding pdf table snipplet for report x.
Of course, the designer cannot anticipate how much data there will be, so I have to be able to add/remove rows dynamically to the table. So my question is, is there a way to recognize that the snipplet I've read is a table?
If the above answer is no, then perhaps what I can do is have a pdf containing a row snipplet (with textfields) and dynamically add that to the document? Would that work as well?