Hi,
I've been trying to be able to print an attachment imbedded in a LiveCycle form using the following JavaScript on the click event of a button:
var oThis = event.target;
var d = oThis.dataObjects;
var oDoc = oThis.openDataObject(d[0].name);
try {
var pp = oDoc.getPrintParams();
pp.interactive = pp.constants.interactionLevel.full;
oDoc.print(pp);
oDoc.closeDoc();
} catch(e) { app.alert("Operation failed------>"+e.name);}
The code assumes the user wants to print the first attachement, it successfully opens and returns the DataObject object for that attachement yet when I pass the object to the print method it returns a 'NotAllowedError' error. The Acrobat 8.0 API doesn't say it shouldn't work, the only constraints seam to be if the interactionLevel is set to silent.
Any help would be appreciated.
Thanks.
Kyle
If so, then you need to follow the instructions for the "S" in the Quick Box for the "print" method.
George Kaiser