Expand my Community achievements bar.

Populating PDF Form with XML File.

Avatar

Former Community Member

Hi,

I need my PDF form to be populated with the data in XML file.I've created a data connction to the file and binded the values to my fields.When I've opened the form in Reader/Acrobat i'm not able to see any date on the form.

Currently,I'm using "xfa.host.importData()" to import an XML file on a button click.It is working fine.But I need to load the data on Form Load itself.

I'm relatively new to PDF technologies.Any help would br gratly appreciated.

Thanks in Advance.

2 Replies

Avatar

Level 5

The binding feature in designer just allows you to describe how to map fields to data elements, not to actually populate them autotmatically. You would need to have a server component to merge data / pre-populate or a script on your reader-enabled form to load the data. You can use xfa.host.importData() in DocReady event if you want it to prompt on loading the pdf. Earlier events in the chain wont work until the form has been properly loaded.

Avatar

Former Community Member

Hi,

Thats really helpful.Thank you.

Can you suggest a server component that I need to install to prepopulate the form.