I wrote a .js. When I open a .pdf from my hd the script works fine, but when I open a .pdf inside my browser it only works once. That means the first time the .pdf-file is being printed but also an empty acrobat reader frame (8.1) opens. When I repeat the printing of the file nothing happens. Even when I try the .pdf-file on my hd, the script doesn't work.
BUT:
When I wait just a few minutes the script works again, till I try to open a .pdf-file directly inside my browser again.
content of my .js-file:
xxx();
function xxx() {
app.beginPriv();
var n = app.activeDocs;
var d = n[0];
if (((d.info.subject).search("TEST")>-1) && ((d.info.author).search("123")>-1 )) {
d.print({bUI: false, bSilent: true, bShrinkToFit: true});
}
app.endPriv();
}
app.trustedFunction(xxx);
thx 4 any help!!!
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script