Expand my Community achievements bar.

importData works before enabling but not after

Avatar

Level 2

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

3 Replies

Avatar

Level 6

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.

Avatar

Level 2

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