Expand my Community achievements bar.

SOLVED

How to import XML-Data from a defined source?

Avatar

Level 1

Hi community,

at the moment i'm developing some administrative forms for the employees of our university.

To facilitate the filling-in i want some common fields to be auto-completed using data from a xml or xdp data source.

First i tried putting the following line of JavaScript Code into the docReady Event or the click event of a button:

xfa.host.importData("/c/path/to/xml/file.xml");

i also tried using a folder level script due to some information i found in some forums.

the .js-file in the Javascripts directory:

myTrustedImport = app.trustedFunction(function(doc, path)
{
app.beginPriv();
var myTrustedRetn = doc.xfa.host.importData(path);
app.endPriv();
return myTrustedRetn;
});

All trys ended up with:

NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
Doc.importXFAData:-1:XFA:Formular1[0]:#pageSet[0]:Seite1[0]:Schaltfläche1[0]:click

which is in english something like:

NotAllowedError: access to this property or method is resetricted by security settings.

Doc.importXFAData...

the same error raises when i certified the document and/or granted extended reader permissions.

Please help me solving this problem.

best regards

Korbinian Kugelmann

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

once the document is certified, the user who wants to use the file has to trust the author of the certificate and allow them to have higher rights.

This is the best documentation I could find on short notice, will look for better

http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS58a04a822e3e50102bd615109794195ff-7d7e.w.html

Hope this helps

Malcolm

View solution in original post

7 Replies

Avatar

Level 5

Hi,

The documentation for the call saws

Therefore the document has to be certified and that cetificate has to be trusted by the user of the form.

This may help if you are not familiar with certified documents

http://blogs.adobe.com/security/2008/01/demo_certified_documents_in_ad.html

Hope this helps

Malcolm

Avatar

Employee

Hello Korbinian,

For security reasons, if you provide the string paramter to the method importData([ STRING param]), the importData method will only execute when

performed on certified documents.

If you do not provide the parameter (a valid string representing the location and name of the file from which the data will be imported),

then the document does not need to be certified.

The term "certified" means the document has been signed with a certifiying signature, which will allow silent importing of the data.

Regards,

KJ

Avatar

Level 1

Hi and thanks for the fast response.

As mentioned in the second last row of the original post I've already tried to certify the form to get the import-method working.

But the error raises anyway

Avatar

Correct answer by
Level 5

Hi,

once the document is certified, the user who wants to use the file has to trust the author of the certificate and allow them to have higher rights.

This is the best documentation I could find on short notice, will look for better

http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS58a04a822e3e50102bd615109794195ff-7d7e.w.html

Hope this helps

Malcolm

Avatar

Employee

A self-signed signature created from Acrobat should suffice for testing purposes.

Avatar

Level 10

Hi,

Our experience is that the digital signature works, however only the first time. The silent import data works, as the form is certified, but this invalidates the signature, so that importing silently from then on fails.

Router (certified).pdf.png

We are certifying the form for that highest level of interaction vailable:

Parallels Desktop1.png

Any ideas?

Niall

Avatar

Level 1

Hey everybody,

it seems like i've had a bad day on wednesday - meanwhile everything works like it should.

Anyway - thanks for your help.

best regards

Korbinian Kugelmann