Skip to main content
Participant
July 27, 2016
Answered

Action Wizard xml import into form

  • July 27, 2016
  • 1 reply
  • 1258 views

Hi everyone,

I've created an action in Acrobat XI using the action wizard to batch export xml files from pdf forms that have been filled out. However I can't see a way to create an action to do the reverse in the action wizard: batch import xml files into a corresponding blank pdf form (the xml and form fields already match perfectly). Importing an xml file into my blank pdf form works when I go to forms->more form options->import data, browse to the xml file and it populates the form perfectly. Then I "save as" with the name of the xml file but with the pdf extension of course, and I'm done. That process takes about 25 seconds for one file. The problem is I have to do this 700 times. I thought to avoid the "save as" step by having one directory containing 700 xml files and 700 blank pdf forms with matching names (john-doe.xml and john-doe.pdf, etc.), but again, I can't see a way to build the action.

Any ideas or advice you have is greatly appreciated. Thank you very much for your time and help!

Chris

This topic has been closed for replies.
Correct answer try67

Try using this code:

this.importAnXFDF(this.path.replace(/pdf$/i, "xml");

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 27, 2016

Try using this code:

this.importAnXFDF(this.path.replace(/pdf$/i, "xml");

Participant
July 28, 2016

Hi try67,

I couldn't get it to work initially but you gave me what I needed to make it work. I neglected to mention in my original post that the form was originally authored in LiveCycle which would have helped, so I replaced "importAnXFDF" with: importXFAData and it worked. I also added another ")". So it looks like this:

this.importXFAData(this.path.replace(/pdf$/i, "xml"));

Thank you so much for getting me there!