Fill pdf form with xml data


















In the template, specific syntax is used to define what the form should look like how it has to be rendered by Adobe Reader. The datasets part consists of the dataDescription, which resembles XSD, and the data. The result will be an empty template. Filling the form is as easy as injecting your XML into the data tag. AcroForms are always static.

If your form needs to be an exact match of an existing form on paper, this is your best match. If you need forms that can grow dynamically much like HTML , you'll soon get frustrated with AcroForms, although there are workarounds that seem to work perfectly. XML Forms can be very dynamic. See for instance a form for movies. It consists of only one page.

Now let's inject an XML file with movies. The result is a form with 23 pages. As you can see, the fields for one movie are repeated times. The field with the director and the country where the movie is produced can also be repeated if necessary. One major downside is that forms like this can only be rendered in Adobe Reader; they don't show up in Apple's Preview and many other non-Adobe PDF viewers.

I'm not sure if this answer helps you out. If not, please clarify as you seem to focus on details such as checkboxes. Aha, reading your question a second time, I now see that I misunderstood the question. You don't want to create XML output after filling out a form. Such a PDF library could be iText maybe in combination with a custom implementation of XML Worker , but note that this will demand some extra programming.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. To populate the form, I have to click In Acrobat 8 Forms, then Manage Forms Data, then Import Data, then specify XML, then drill to the location of the file which I store in the same directory, but have to navigate to it from the default location of 'My Documents' nonetheless.

I would love to have a button that would run a macro to accomplish all that. I see now. Yes, you could add a single button which runs the following javascript. I use it all the time. If you need to know the format of the XML file, then you could call exportData , or it's most likely the same format as your XML file you are able import from the menu.

Scott: I've been fumbling around trying to get the button to work. You indicated that you do this all the time Would you mind emailing me an example that I could examine?

I could copy your technique that way. I would be most appreciative. Thanks in advance! Bill Geary bill [at] repservices [dot] com. What version of Reader are you trying to run this Importdata command in. I'm using reader 8. Also, I forgot to mention that you have to certify your document ion reader before it will work, so sending you an example is only part of the solution. I'm actually trying to populate the form in Acrobat 8.

I haven't gotten to the point of trying it in Reader. What do you mean by 'certify your document ion reader? I'm assuming I should be able to open your PDF in LiveCycle and see how you're attaching your javasript to the button. Would you mind letting me see one of your forms? I've tried in Reader and can't get the importData to work.

That makes sense, if you think about it. The average end-user wouldn't have the technical capability to structure the XML data for import. Fails to convert then this may be caused by the location of the XSN file not being trusted.

I have to make some assumptions here as the question does not go into much detail. I assume you want to automate the conversion from InfoPath to MS-Word whenever a new form is saved in a Document or Form Library, which is a common requirement as it makes it easier to distribute the file to people who don't have InfoPath installed or who don't have access to the underlying XSN file.

See this example. Disclaimer, I wrote this post so consider me biased. D Right click the. We strive to keep our articles as accurate as possible.



0コメント

  • 1000 / 1000