I want to save a form as xml by clicking a tool button.
I always get a security error (mentioned in subject above), althoug saveAs method is run as trustedFunction.
CODE: ************************************************************
var mySaveAs = app.trustedFunction(
function(Doc)
{
app.beginPriv();
Doc.saveAs('c:/test.xml','com.adobe.acrobat.xml-1-00');
app.endPriv();
});
// add a toolbutton "DCT_Backend"
app.addToolButton({
cName: "dct_tool_button2",
cExec: "mySaveAs(this);",
cTooltext: "XML-Export Formular",
cEnable: true,
cLabel: "DCT - Formular XML Export",
nPos: -1
});
******************************************************************
what am i doing wrong?
Problem #2: You are trying to save the file at the root folder, which is not a safe path.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com