Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Data binding working inside LiveCycle

Not applicable
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?
11 Replies
pguerett
Level 10
Level 10
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();
Not applicable
is there any way to get a text field to pull content and display automatically? Every time the pdf is opened?
pguerett
Level 10
Level 10
Where would this content come from?
Not applicable
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.
pguerett
Level 10
Level 10
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.
Not applicable
I am open to both - whatever works and is the easiest to implement and maintain the disclaimer file.
pguerett
Level 10
Level 10
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
xiaoxiao21
Level 1
Level 1

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.

pguerett
Level 10
Level 10

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

xiaoxiao21
Level 1
Level 1

OK. I have a import from .xml in Acrobat Proffesional, but when i change this file in PDF nothing changes, unless i repeat this action. This is not good, because I have do this automaticly. Which options should I set in button?

I don't understand. I have to change file data.xml to data.xdp?

Hier is my .xml file  http://www.speedyshare.com/files/29710064/data.xml

And generated .xsd file  http://www.speedyshare.com/files/29710066/data.xsd


PDF file witch I would like to update on every opening  http://www.speedyshare.com/files/29710076/import_from_xml.pdf

Please help me

pguerett
Level 10
Level 10

You can save the xdp file straight out of the pdf (it is an option when you execute the save data. It follows the same fornat as the normal xml file but has an additional root node  and a reference to the xdp template being used. Now you woudl use the xdp file to launch acrobat and not the PDF.

Make sense?

Paul