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

doc.exportXFAData not working even after PDF document certified.

shahal
Registered: May 3 2007
Posts: 43

I have created a form in LC that when the user clicks a button, the form should export data into XML and save it with a filename from a form field data. The saving part works great. The XML export does not.
 
I keep getting this security error in Acrobat Pro 9:
NotAllowedError: Security settings prevent access to this property or method.
Doc.exportXFAData:12:XFA:form1[0]:#subform[0]:Button1[0]:mouseUp
 
I certified the document using Acrobat Pro 9
This still did not work.
 
Am I doing something wrong with certifying the doc or is my code off?
 
Here is it:
 
Folder Level:
var mySaveDoc = app.trustedFunction(function(doc) {
 

app.beginPriv();
 
var cPath = "/network_drive/folder1/folder2/" + "/" + " " + empname + ".xml";
var myPath = "/network_drive/folder1/folder2/" + "/" + " " + empname + ".pdf";
 
// saveAs and exportXFAData is the only privileged code that needs to be enclosed
// with beginPriv/endPriv
doc.saveAs(myPath);
doc.exportXFAData(cPath);
app.endPriv();
 
});
  
Button:
//empname = xfa.resolveNode("xfa.form.topmostSubform[0].Page1[0].GradID[0]").rawValue
empname = xfa.resolveNode("form1.#subform[0].GradName").rawValue
 
event.target.mySaveDoc(event.target);
  
Please help.

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Did you try an application level folder function with the appropriate trusted furnacing and privileges in use?

You need to send the PDF to a certifying service for certification, not apply application level certification. See the Acrobat JS API Reference for more information.


George Kaiser

shahal
Registered: May 3 2007
Posts: 43
Hi George,
I am sorry but I am very new to java scripting and folder level functions.
Could you possibly guide me?

Also, would certification of a document incur a cost?



Thanks