Highlighted

importData works before enabling but not after

Avatar

Avatar

JLNdev

Avatar

JLNdev

JLNdev

30-03-2017

Hello,

I've done some pretty thorough searches, and I can only find this problem listed as a side note--nothing that directly addresses it.

I have created a PDF form in LiveCycle Designer ES4 and it includes an import button which uses this code:

xfa.host.importData("");

Note: The import button works great in Acrobat DC Pro prior to enabling.  However, once I enable it as a Reader Extended PDF, the enable button completely stops working.

The error in the JavaScript Debugger dialogue reads like so;

NotAllowedError: Security settings prevent access to this property or method.

Doc.importXFAData:1:XFA:form1[0]:page1-OnePageProfileSection[0]:Header[0]:FormControls[0]:Button-Import[0]:mouseUp

Just to be clear: I know the enabling feature won't be available in Reader, enabled or otherwise, and that is not my goal.  This is specifically a problem with Acrobat Pro DC.  Why would enabling the PDF cause the import button to stop working in Pro DC?  My users will need to both import data and be able to save the content they import or enter into the form, so I can't sacrifice enabling for the import feature. We really need both to work.

I am working in a Windows 7 Enterprise environment and we don't have LC server yet.  Just LC Designer and Acrobat Pro DC (2015.023.20070).

Thanks in advance for your assistance!

JLN

Replies

Highlighted

Avatar

Avatar

George_Johnson

Avatar

George_Johnson

George_Johnson

31-03-2017

If you Reader-enabled the document with Acrobat, the form data import/export usage right is not included. Since it's not, you won't be able to use the importData JavaScript method, either with Acrobat or Reader. You'd have to add the usage right via LiveCycle Reader Extensions (or whatever it's called nowadays) for it to work.

Highlighted

Avatar

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485
radzmar
MVP

01-04-2017

Highlighted

Avatar

Avatar

JLNdev

Avatar

JLNdev

JLNdev

20-04-2017

Hi Radzmar,

Hey, I think I have it partially figured out! I was able to set up a custom variable function with the code from your site, and I was able to set up the import button with the associated "actions.importXML()" code. However, when I export the data and then import it, I'm getting an invalid data message. Is there a chance I could send you the form and have you look at it, so you can tell me what I'm doing wrong?

Thanks for considering it!

JLN