These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

importDataObject

GD
Registered: Aug 16 2008
Posts: 12

Is there a way to use this function from a document-level or folder-level script?

In the JS reference, it precised that it can be called through an "external call".
However the JS API reference, also precises about external events :

"This event is the result of an external access, for example, through OLE, AppleScript, or loading an FDF."

So loading a FDF might be considered as an external call and be used to call importDataObject?

Regards

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It depends on whether you need to specify a file path. If you do, then there are security restrictions. To use the importDataObject method from a document event, you'll need to set up a folder-level JavaScript file and place the code in a trusted function (or trust propagator function), enclosing the statement in an app.beginPriv/app.endPriv block. Thom Parker wrote a fine article here recently that explains a lot about using trusted functions in folder-level code.

Do you want to use an FDF for this?

George