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

Web to XML to PDF form? What am I doing wrong/missing?

JumpingDragoons...
Registered: Nov 4 2009
Posts: 8
Answered

I've searched through the posts here in hopes of finding an answer to my question/problem, but haven't had any luck, so my apologies if this has been answered before.

I'd like to preface this by stating that my background isn't particularly technical, though I'm pretty good about figuring things out with some research and a little trial and error. Still, I lack any sort of scripting/programming knowledge, though I have a resource available who is also working with me on this little project.

I'm using Acrobat Pro 8 and LiveCycle 8.

For starters:

1. Clients fill out a form on our web site.
2. Data from web form is archived in an Excel spreadsheet
3. We also have a LiVeCycle-designed form that corresponds with the web form (field IDs/names match on both).

What I'm trying to do is assemble the data from the web form and transfer/import to the PDF form to print out en masse for our instructors.

So far, I have an XML table that's mapped according to the matching field IDs on both the web and PDF forms. However, I can't seem to get this data to batch import.

Initially, I tried to import the XML table into the PDF form, but that didn't work. It simply remained blank. After eliminating data from all but one form in the XML file, it it imported without a hitch, so I'm confident it's not a mapping issue.

I then created a Data Set PDF, but I can't seem to directly import XML into that; just the completed PDF forms.

I know this can be done, but I may be approaching it the wrong way. We don't want to use the PDF Form Distribution as a means of gathering the data. We need the form available without having to initiate the distribution, thus the web counterpart.

Is it possible to do this without any sort of scripting? Could someone help? Pretty please?

Thanks!

My Product Information:
Acrobat Pro 8.1.3, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Let me see if I understand your issue. You've collected several datasets from an HTMl form and you need to import them one by one into the same PDF Form and print. Is this correct?

If it is then what you are describing is a variable data print process. Batch processing won't help. In batch processing Acrobat opens several different PDF forms and performs the same operation on each. You want a different kind of process, Open the same PDF with different data.

You can perform this as a manual process without scripting, but if you want it automated you'll need some kind of programming.

So try this. Manually fill in some fiels on your PDF form and then export data your PDF form as XML from the "Forms ->Manage Form Data -> Export Data..." menu item. Open up this XML file and see if the format matches the format of the XML generated from the Web collected data? Change some data in the XML and import it. You can have only one XML file per dataset on a PDF form, which is why deleting all but one dataset worked.So once you have the XML Gramar down there are two approaches.
1. Put the web collected data into individual XML files for each dataset. Then import each XML file and print.
2. Put all datasets for the web collected data into one XML file, like you have already done. Then design your PDF form to Repeat the top form for each Dataset in the XML. So now when the data is imported the the PDF form expands into several pages, one for each dataset.

Neither of these approaches requires scripting, but the LiveCycle PDF form has to be structured in just the right way to allow for the dynamic expansion in #2.

There are also several other ways to do this using scripting. For example, reading the data out of a database, I have a prebuilt automation tool for this one www.pdfscripting.com. Print shops have been doing this kind of thing forever. So what you are trying to do quite common.

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

JumpingDragoons...
Registered: Nov 4 2009
Posts: 8
thomp wrote:
Then design your PDF form to Repeat the top form for each Dataset in the XML. So now when the data is imported the the PDF form expands into several pages, one for each dataset.
I believe the above suggestion is exactly what I'm looking for. How exactly would I go about doing this? I've searched through LiveCycle and can't quite seem to locate such an option.

thomp wrote:
There are also several other ways to do this using scripting. For example, reading the data out of a database, I have a prebuilt automation tool for this one www.pdfscripting.com. Print shops have been doing this kind of thing forever. So what you are trying to do quite common.
This is a most welcome suggestion, too, and I believe that's where we'll ultimately move. My goal is to get a better grasp on the power, functionality, and the ins and outs of LiveCycle and Adobe forms before we pursue a more automated option.

Thank you again!
Chris
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There's no difference between repeating a small subform, like a line in an order form, and repeating the entire form. Here's a video tutorial that covers the topic. And there is more of this stuff on the site:
https://admin.adobe.acrobat.com/_a200985228/p87746471/

This eSeminar covers scripting for dynamic features. You don't need the scripting. The part you are intested in is how to structure the fields and subforms. Then when you import data the form grows to accomodate the amount of data.

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