Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

importData - Signature - ReaderExt

Avatar

Former Community Member
Hi,



I try to use xfa.host.importData("c:\\test.xml")

to import xml-data into my document (click event in a button object)



this works fine in acrobat if the document is signed.



in order to use this function in the adobe reader I've to use reader extensions in order to enable the import function,

but if I do so the xfa.host.importData("c:\\test.xml") the script throws an error, even in acrobat.

Why?

regards

Johannes
2 Replies

Avatar

Former Community Member
To be able to import a file programmatically you have to certify the document (a form of signing). If the form is not signed then you will only be able to use xfa.host.importData() and a dialog will come up and allow the user to choose the file to import. To be able to certify a Reader Extended form digital signatures must be enabled through Reader Extensions as well.

Avatar

Former Community Member
Hi Paul,

thx,

works out by clicking on the button, by using a digital signature field on the form.



nevertheless I get an error if I put the script on the initialize-event



form1::initialize - (FormCalc, client)

xfa.host.importData("C:\\test.xml");



regards

Johannes