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

importDataObject in Adobe Reader

geko85
Registered: Nov 28 2008
Posts: 2
Answered

Hello Alll,

i have a PDF-Form created in Acrobat Pro 8.
In this form there is a Dropdown-List, its options are imported by an XML-File, the user can attach.

This works fine in Acrobat but unfortunately not in Adobe Reader due to security settings. The Document is Usage-Richtgs enabled and the XML-File should be attached per Button-Javascript, that calls a folder-level trusted function.
See code below:

Button on mouseup:
trusted_importXML();
The trusted functions stored in 'Program Files/../../../Javascripts/':

trusted_importXMLData = app.trustPropagatorFunction(
  function(oDoc)
	{
    app.beginPriv();
		  oDoc.importDataObject("Anhang");
		app.endPriv();
	}
);
trusted_importXML = app.trustedFunction(
  function(oDoc)
	{   
    app.beginPriv();
		  trusted_importXMLData(this);
		app.endPriv();
	}
);

Unfortunately the Reader always throws an Error:
NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
Doc.importDataObject:6:Field Schaltfläche1:Mouse Up

Where is the mistake, or is there no possibility to import Data objects in Reader?

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It's possible, but Acrobat cannot apply the relevant usage rights (EF - embedded files: Create, Delete, Modify, Import). Adobe's LiveCycle Reader Extensions can apply these rights.

George