3 Replies Latest reply on Aug 29, 2009 3:30 AM by Jayarray

    Batch import and distribution of Forms


      I have a requirement to distribute to clients forms prepopulated with their existing data, for them to correct and return.


      I've got the XML feeding into the LCD form and then generating the _distributed.PDF just fine. I've even got an XML file of 100 records feeding into the form correctly, but then you can't split the compiled form into the 100 personalised forms for distribution - split by bookmarks doesn't work, and extractPages comes up with a security error.


      There is a Populate and Save to Folder batch sequence, but the documentation for this is incomplete (the FormsBatch.pdf mentioned by the Batch Sequences documentation is nowhere to be found), and in any case this is trying to feed in data from an MS Access .MDB database, which is not what I want.


      So how do I set up a batch process to import multiple XML records into a single form and output one _distributed.PDF for each of them?


      (By the way, the form needs to be a dynamic form of variable length because when I fill out the XML with all the customer info it will need flexible subforms.)

        • 1. Re: Batch import and distribution of Forms
          Hodmi Level 4

          If you didn't need the form to still be interactive (i.e. a flat form) then it would be easy to do this using LC Output as it has this functionality built in.


          Since you need the form to be interactive (so users can update their data) then you will need to split the XML up prior to calling LC Forms.  Fortunately you should be able do this within a workflow.  You'll need to add loop where you can iterate through the XML file using an XPath expression to get each record individually and then pass that data to Forms.

          • 2. Re: Batch import and distribution of Forms
            Jayarray Level 1

            Thanks for the prompt answer.


            I'm using LCD within Acrobat Pro 9 and I've got my head round basic Javascript, but I'd be grateful if you can help me a bit more with XPath and workflow.

            • 3. Re: Batch import and distribution of Forms
              Jayarray Level 1

              No further help forthcoming.


              Meanwhile I have found I can use the importData method programmatically to fill a template with data, i.e. create an LC form. And resetData is fine to clear the fields. But all my attempts to save the form by the use of exportData or saveAs (at the app level) have met with failure.


              Can anyone out there help me?