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

JavaScript doesn't run on acrobat reader 8

whatever
Registered: Aug 23 2007
Posts: 21

Hi there,
 
I've spending two long days trying to spot out the failure in the script below; the script's goal is show the current date&time each time the document is sent to printer. It happens that it works well if i print the document from my own computer (running an acrobat 8 professional trial version), but when the document is printed by using acrobat reader 8 the script seems not to run as it shows an older date&time value.
The script is loaded on the "Will print" and also in he "will save" events.
This is such script:
var feimp=new Date();
var lorva='VALIDO POR EL DIA DE '+util.printd("dd/mmm/yyyy HH:MM:ss",feimp)+'.';
for(var pag=0;pag

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I'm sorry, but your script didn't come through because of the less than symbol on the for loop. Please re-post and replace the less than with < Just so we know it's there.You can do your own debug with the Acrobat JavaScript Console. There's a package for installing the Debugger/Console on Reader on this page.

[url=http://www.windjack.com/products/freestuff.php]http://www.windjack.com/products/freestuff.php[/url]

Scroll down to the bottom of the page and download the "JavaScript Console for Reader 7.0". It will still work for Acrobat 8. However, there are some setting in the registry file that should be tweaked. Just edit the registry file and the changes will be obvious.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script