Adobe acrobat forms javascript object specification 用户手册

下载
页码 64
Acrobat Forms - JavaScript Object Specification
61
((diff / 60) / 60) / 24 + " days since 4/11/1976");
console.println("It has been " +
(((diff / 60) / 60) / 24) / 365 + " years since 4/11/1976");
The output of this script would look something like:
It has been 718329600 seconds since 4/11/1976
It has been 11972160 minutes since 4/11/1976
It has been 199536 hours since 4/11/1976
It has been 8314 days since 4/11/1976
It has been 22.7780821917808 years since 4/11/1976
The following example shows the addition of dates.
/* Example of date arithmetic. */
/* Create a date object containing the current date. */
var d1 = new Date();
/* num contains the numeric representation of the current date. */
var num = d1.valueOf();
/* Add thirteen days to today’s date. */
/* 1000 ms / sec; 60 sec / min; 60 min / hour; 24 hours / day; 13 days */
num += 1000 * 60 * 60 * 24 * 13;
/* Create our new date that is 13 days ahead of the current date. */
var d2 = new Date(num);
/* Print out the current date and our new date using util.printd */
console.println("It is currently: " + util.printd("mm/dd/yyyy", d1));
console.println("In 13 days, it will be: " + util.printd("mm/dd/yyyy", d2));
The output of this script would look something like:
It is currently: 01/15/1999
In 13 days, it will be: 01/28/1999
Acrobat Forms and Security
Security in Acrobat takes on the form of restricting access to a document, restricting
permissions for a form once it has been opened, and digital signatures.
Restricting Access
If the author desires to restrict access to the form in its entirety then the standard security
model in Acrobat can be selected and an open password defined that requires a user to type in a
password before opening the form. Other security handlers exist and are provided by third
party developers as plug-ins and may also be useful. E.g. using a public/private key