Highlighted

Data binding working inside LiveCycle

Avatar

Guest

07-10-2008

I have a data connection to a file that I want to load each time pdf is launched - just display content Inside LiveCycle it works and in the Preview PDF it works too, but when I save and close it then reopen it in Acrobat, the box shows up but it is empty. I set it up with my DataConnection as a Sample XML Data and placed my XML file at the root of the folder... same level as the pdf file. What am I doing wrong?

Replies

Highlighted

pguerett

08-10-2008

Just placing the data file at the root will not import the file. If you open the data file from inside of Acrobat/Reader (Forms/Manage Form Data/Import Data) that will merge your data onto your form.



You could also put a button on the form to allow the user to import the data file. On the click of the button put this javascript code:



xfa.host.importData();
Highlighted
Highlighted

Avatar

Guest

08-10-2008

What I have is a legal disclaimer that changes through out the year. I can make it whatever I need to as long as I can update it. I had it as a text file and then set it up as sample xml data as I saw this data binding feature.
Highlighted

pguerett

08-10-2008

If it is xml then you will need to merge the two files together at runtime. This is done using server software .....are you looking at a client only solution or is a server in the mix as well.
Highlighted

pguerett

09-10-2008

There are products on the server side (LiveCycle) which will do the merge for you so that when you serve up the form it is already populated with data. Conversely those products can also expose data sources as web services and you can use that technique to populate the forms on start up.



If you want to stay with the client only, then the user will have to choose a data file after the form is loaded. You cannot automate the import of a data file on the client only....that is a security breach!



Hope that helps
Highlighted

xiaoxiao21

03-08-2011

I have similar problem. I have .xml file or .xsd file with data with i would like to fill the form for every open of PDF in Reader. What should I do? I tried but nothing give a positive results. Maybe some javascript code.

Highlighted

pguerett

03-08-2011

Assuming that you have bound the files to the chema correctly, then you will have to import that data file when theform is opened on the client. You can do tyhis through menu options in Acrobat or you can have a button that will allow the user to choose a data file to import. AS long as the data file follows the same structure of the one that was defined in the template then your data will appear.

Two other options exist - use a server side product to merge the data onto the template before the PDF is rendered. Or, have a reference to the template that is being used in the xml file (change its extension to xdp) and double click the xdp file. This will casue the template to open and the dat file to be merged into the opened file. This assumes that you have the template on yor local machine and that you DO NOT have Designer on that machine (XDP extensions are associated with Designer as well as Acrobat).

Paul