6
Using Acrobat JavaScript in Forms
Forms Essentials
var ppklite = security.getHandler("Adobe.PPKLite");
var oParams = {
password: "myPassword",
cDIPath: "/C/signatures/myName.pfx" // digital signature profile
};
ppklite.login(oParams);
f.signatureSign(ppklite,
{
password: "myPassword",
location: "San Jose, CA",
reason: "I am approving this document",
contactInfo: "userName@adobe.com",
appearance: "Fancy"
}
); //end of signature
Text Field Properties
The text field has many of the same properties as buttons and combo boxes. In addition, it
offers the following specialized properties shown below in
Table 6.4:
T
ABLE
6.4
Text Field Formatting
Property
Description
justify text
set a default text string
allow multiple lines in the
area
Example
f.alignment = "center";
f.defaultValue = "Name: ";
f.multiline = true;
alignment
defaultValue
multiline
doNotScroll
richText
charLimit
password
fileSelect
doNotSpellCheck
comb
permit scrolling of long text
f.doNotScroll = true;
set rich text formatting
limit on number of
characters in area
use special formatting to
protect the user’s password
format field as a file
pathname
set spell checking
comb of characters subject
to limitation set by
f.richText = true;
f.charLimit = 40;
f.password = true;
f.fileSelect = true;
f.doNotSpellCheck = true;
f.comb = true;
charLimit
100
Acrobat JavaScript Scripting Guide