These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Reading Adobe Dynamic XML Form using java PDF tool like iText....

pavankumarreddyr
Registered: Dec 8 2008
Posts: 18
Answered

I created a PDF of type "Adobe Dynamic XML Form", i created a container with a set of textfields in it and i created a instanceManager for that subform using which i am creating multiple containters with textfields at runtime.

Code:
Subform1.Subform2.instanceManager.addInstance(1); // in a for loop

Now the requirement is i want to read the values of these fields using a java PDF tool like iText.
I haven't seen any article which talks about reading the values of dynamically added textfields like the way i added above.

Can you please suggest is there a way to read these dynamically fields using any java PDF tool?

Thanks in advance,
Pavan

R pavan kumar reddy

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The data in a LiveCycle form is stored in the Data Model, not in the fields. This is a separate section of the XML. I don't think iText has been updated to handle XFA forms. But iText has the wonderful ability to drill down to the PDF structure. So you can write some code to extract and parse the Data Model XML. But to do this you need to be familiar with PDF structure. The XFA is stored in a series of streams inside the AcroForm dictionary, in a dict node called XFA. It's here you'll find the stream containing the DataModel.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script