Hello all,
I finally managed to get my silent print JavaScript to work but I can’t figure out how to get rid of the annoying security prompt "This document is trying to print. Do you want to allow this?". I tried adding the JavaScript folder to the trusted sites under Security (Enhanced) but I am still being nagged with this prompt. Is this feature only for PDF files or can it be used for JavaScript files? I added a button so the user can just click and the PDF document will save in a specified location using PDFCreator. Yes, I know it is strange that I am printing a PDF file to a PDF but I have my reasons. Is it possible to get rid of this message or am I going to have to put up with it. Here is my code:
function silentprint()
{
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.silent;
pp.printerName = 'PDFCreator';
this.print(pp);
}
function toolbar()
{
app.beginPriv();
app.addToolButton({
cName: "myToolButton",
cLabel: "Flatten Active Form",
cExec: "silentprint();",
cTooltext: "Click to flatten active form.",
cEnable: true,
nPos: 0
});
app.endPriv();
}
toolbar();