Adds a contact to the FDF file.
oUserEntity |
An UserEntity object that list the contact to be added to the FDF file. |
Throws an exception on failure.
var oEntity={firstName:"Fred", lastName:"Smith", fullName:"Fred Smith"};
var f = app.newFDF();
f.addContact( oEntity );
f.save( "/c/temp/FredCert.fdf" );
Add the specified file to the end of the array of embedded files in the FDF file. Anyone opening the FDF file will be instructed to save the embedded file or files according to nSaveOption. If the embedded file is a PDF file, it is opened and displayed. If the embedded file is an FDF file, the file is opened for processing.
FDF files containing embedded files have been supported beginning with
cDIPath |
(optional) A device-independent absolute path to a file on the user’s hard drive. If not specified, the user is prompted to locate a file. |
nSaveOption |
(optional) Specifies how the embedded file will be presented to the user opening this FDF file, where the file will be saved, and whether the file will be deleted after it is saved. Values are: 0 — The file will be saved to the 1 — (the default) The user will be prompted for a file name to which to save the embedded file. 2 — Should not be used. 3 — The file will be automatically saved as a temporary file and deleted during cleanup (when In For all values of nSaveOption, if the file is a PDF or FDF file, it is automatically opened by |
Throws an exception if this operation could not be completed, otherwise returns the number of embedded files that are now in the FDF file.
Create a new FDF, embed a PDF doc, then save.
var fdf = app.newFDF();
fdf.addEmbeddedFile("/C/myPDFs/myDoc.pdf");
fdf.save("/c/temp/myDocs.fdf");
Adds a request to the FDF file. There can be only one request in an FDF file. If the FDF file already contains a request, it is replaced with this new request.
cType |
What is being requested. Currently the only valid value is the string “CMS”, which is a request for contact information. |
cReturnAddress |
The return address string for the request. This must begin with |
cName |
(optional) The name of the person or organization that has generated the request. |
Throws an exception if there is an error.
var f = app.newFDF();
f.addRequest( "CMS", "http://www.example.com/cgi.pl", "Acme Corp" );
f.save( "/c/tmp/request.fdf" );
Immediately closes the FDF file.
Throws an exception if there is an error.
See the FDF object save method, which also closes an FDF file.
See example following the addEmbeddedFile method.
Saves the FDF object as a temporary FDF file and mails this file as an attachment to all recipients, with or without user interaction. The temporary file is deleted after it is no longer needed.
See also app.mailGetAddrs, app.mailMsg, the Doc methods mailDoc and mailForm, and the Report object method mail.
Note:On Windows, the client computer must have its default mail program configured to be MAPI enabled to use this method.
bUI |
(optional) Specifies whether to display a user interface. If true (the default), the rest of the parameters are used to seed a compose-new-message window that is displayed to the user. If false, the cTo parameter is required and all others are optional. Note:( |
cTo |
(optional) A semicolon-separated list of recipients for the message. |
cCc |
(optional) A semicolon-separated list of CC recipients for the message. |
cBcc |
(optional) A semicolon-separated list of BCC recipients for the message. |
cSubject |
(optional) The subject of the message. The length limit is 64 KB. |
cMsg |
(optional) The content of the message. The length limit is 64 KB. |
Throws an exception if there is an error.
var fdf = app.openFDF( "/c/temp/myDoc.fdf" );
/* This opens the compose new message window */
fdf.mail();
/* This will send out the mail with the attached FDF file to fun1@example.com
and fun2@example.com */
fdf.mail( false, "fun1@example.com", "fun2@example.com", "",
"This is the subject", "This is the body.");
Save the FDF object as a file. A save will always occur. The file is closed when it is saved and the FDF object no longer contains a valid object reference.
See the close method, which also closes a FDF file.
cDIPath |
The device-independent path of the file to be saved. Note:cDIPath must be a safe path (see Safe path) and must have an extension of .fdf. |
Throws an exception if there is an error.
Create a new FDF, embed a PDF doc, then save.
var fdf = app.newFDF()
fdf.addEmbeddedFile("/C/myPDFs/myDoc.pdf");
fdf.save("/c/temp/myDocs.fdf");
If the FDF object is signed, clears the signature and returns true if successful. Does nothing if the FDF object is not signed. Does not save the file.
true on success.
Sign the FDF object with the specified security object. FDF objects can be signed only once. The FDF object is signed in memory and is not automatically saved as a file to disk. Call save to save the FDF object after it is signed. Call signatureClear to clear FDF signatures.
oSig |
The SecurityHandler object that is to be used to sign. Security objects normally require initialization before they can be used for signing. Check the documentation for your security handler to see if it is able to sign FDF files. The signFDF property of the SecurityHandler object will indicate whether a particular security object is capable of signing FDF files. |
oInfo |
(optional) A SignatureInfo object containing the writable properties of the signature. |
nUI |
(optional) The type of dialog box to show when signing. Values are: 0 — Show no dialog box. 1 — Show a simplified dialog box with no editable fields (fields can be provided in oInfo). 2 — Show a more elaborate dialog box that includes editable fields for reason, location, and contact information. The default is 0. |
cUISignTitle |
(optional) The title to use for the sign dialog box. It is used only if nUI is non-zero. |
cUISelectMsg |
(optional) A message to display when a user must select a resource for signing, such as selecting a credential. It is used only when nUI is non-zero. |
true if the signature was applied successfully, false otherwise.
Open an existing FDF data file and sign.
var eng = security.getHandler( "Adobe.PPKLite" );
eng.login("myPassword" ,"/c/test/Acme.pfx");
var myFDF = app.openFDF( "/c/temp/myData.fdf" );
if( !myFDF.isSigned ) {
myFDF.signatureSign({
oSig: eng,
nUI: 1,
cUISignTitle: "Sign Embedded File FDF",
cUISelectMsg: "Please select a Digital ID to use to "
+ "sign your embedded file FDF."
});
myFDF.save( "/c/temp/myData.fdf" );
};
Validate the signature of an FDF object and return a SignatureInfo object specifying the properties of the signature.
oSig |
(optional) The security handler to be used to validate the signature. Can be either a SecurityHandler object or a generic object with the following properties: oSecHdlr — The SecurityHandler object to use to validate this signature. bAltSecHdlr — A Boolean value . If true, an alternate security handler, selected based on user preference settings, may be used to validate the signature. The default is false, meaning that the security handler returned by the signature’s handlerName property is used to validate the signature. This parameter is not used if oSecHdlr is provided. If oSig is not supplied, the security handler returned by the signature’s handlerName property is used to validate the signature. |
bUI |
(optional) If true, allow the UI to be shown, if necessary, when validating the data file. The UI may be used to select a validation handler, if none is specified. |
A SignatureInfo object. The signature status is described in status property.
Open an FDF file, if signed, validate it the signature and return information to the console.
fdf = app.openFDF("/c/temp/myDoc.fdf");
eng = security.getHandler( "Adobe.PPKLite" );
if (fdf.isSigned)
{
var oSigInfo = fdf.signatureValidate({
oSig: eng,
bUI: true
});
console.println("Signature Status: " + oSigInfo.status);
console.println("Description: " + oSigInfo.statusText);
} else {
console.println("FDF not signed");
}