I have entered a javascript code in Document Javascripts that should prevent any versions less than 7 from staying open.
Here is the code:
if (app.viewer < 7) {
app.alert ("You must have Adobe Acrobat Reader 7.0 or later to view this pdf. Please download a free Reader from Adobe's website, [link=http://www.adobe.com.]www.adobe.com.[/link]")
this.closeDoc(true)
}
However when I open (trial) the pdf in Acrobat 5 or 6 instead of my alert and autoclose, I get three alerts in succession:
There was a problem reading this document (9)
then:
This file may contain newer information than the viewer can support. Adobe recommends that you upgrade to the latest version....
But the document does not close.
So how can I make my javascript dominant over what I guess are the built in alerts of Reader 5 or 6?
Thanks
Greg
When adding features specific to Acrobat viewers version 6 and above, add JavaScripts at the document
level to assess viewer versions
//is the viewer version less than 7.0
if(app.viewerVersion < 7.0)
{
var msg = "Some features won't work in Acrobat viewer versions less than version 7.0.";
app.alert(msg);
}For features not executable in Adobe Reader, add a JavaScript at the document level to assess viewer types.
//is Reader (as opposed to Acrobat)
if(app.viewerType == "Reader")
{
var msg = "Filling out this form requires use of Acrobat Standard or Acrobat Professional.";
app.alert(msg);
}
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.