The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

abhishek_189 (5) [Avatar] Offline
#1
Hi Everybody,

I am using iText to stamp dynamic data in an existing pdf template (created by using adobe tools) as and when required.The template pdf has some text fields, combo box and a table (with 3 columns). The table may contain any no. of rows depending on the dynamic text and have to be modified dynamically at run time.

Can anyone please help me as to how can I get hold of the table and then its cells(rows and columns) to insert data in the them.

Thanks in Advance.
Abhishek
blowagie (284) [Avatar] Offline
#2
Re: Insert text into already existing Table in a pdf template
You are describing a PDF that has dynamic XFA inside.
You have used LiveCycle Designer to create it.
No other company than Adobe has software that allows you to do what you desire.
abhishek_189 (5) [Avatar] Offline
#3
Re: Insert text into already existing Table in a pdf template
Does that mean that i can't use iText to recognize the table. Is there any way of doing it through tagged pdf.
If this is also not gonna work, please suggest me how can i dynamically create a table at desired place and insert text into it.
Thanks in advance.
Abhishek
blowagie (284) [Avatar] Offline
#4
Re: Insert text into already existing Table in a pdf template
If your PDF is tagged and the tags include the table structure, then you may be able to find the PDF syntax that is responsible for rendering the content of a cell. While it may look easy to replace this particular part of PDF syntax, it's not easy to do this properly: for instance: tagged PDF doesn't tell you anything about the dimensions of the cell.

I don't think you are using the right approach here. While creating your PDF, you're better of adding annotations or fields to define the location of the cells (you can remove these annotations or fields afterwards).