Skip to main content
Participant
July 21, 2023
Question

importXFAData stopped working with Acrobat Pro DC

  • July 21, 2023
  • 1 reply
  • 278 views

Using PDF XFA forms created with Adobe LiveCycle Designer ES4. Data stored in a Microsoft Access database is converted to an XML file and then imported into a blank PDF XFA form using importXFAData. My workgroup has been using this feature for over three years with huge success/satisfaction.

 

VB code clip:

Dim AcroApp As Object

Dim theForm As Object

Dim jso As Object

Set AcroApp = CreateObject("AcroExch.App")

Set theForm = CreateObject("AcroExch.PDDoc")

theForm.Open myBlank 'open the blank PDF form with path=myBlank

set jso = theForm.GetJSObject

jso.importXFAData myFile 'import the xml file located at path=myFile

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
July 21, 2023

The import function is being called from the context of a VB script, but it is a JavaScript function.  They are very different worlds and this could be the issue. 

Run the same import function with the same file from the Console Window in Acrobat. Make sure the file path is formatted correctly, or better yet don't include the path at all so that Acrobat displays the file Open dialog.

If the import doesn't work from its native context, then you'll know that something has changed. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often