|
|
•
• Using the Microsoft .NET client assembly, create a SignatureServiceService object by invoking its default constructor.
• Create a BLOB object by using its constructor. The BLOB object is used to store a PDF document that is certified.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the PDF document to certify and the mode in which to open the file.
• Create a byte array that stores the content of the System.IO.FileStream object. You can determine the size of the byte array by getting the System.IO.FileStream object’s Length property.
• Populate the byte array with stream data by invoking the System.IO.FileStream object’s Read method and passing the byte array, the starting position, and the stream length to read.
• Populate the BLOB object by assigning its binaryData data member with the contents of the byte array.Certify the PDF document by invoking the SignatureServiceService object’s certify method and passing the following values:
• The BLOB object that represents the PDF document to certify.
• A Credential object that represents the credential that is used to certify the PDF document. Create a Credential object by using its constructor and specify the alias by assigning a value to the Credential object’s alias property.
• A HashAlgorithm object that specifies a static data member that represents the hash algorithm used to digest the PDF document. For example, you can specify HashAlgorithm.SHA1 that results in the SHA1 algorithm being used.
•
• An MDPPermissions object’s static data member that specifies actions that can be performed on the PDF document that invalidates the signature.
• A Boolean value that specifies whether to consider the MDPPermissions object that was passed as the previous parameter value.
• A PDFSignatureAppearanceOptions object that controls the appearance of the certified signature. Create a PDFSignatureAppearanceOptions object that controls the appearance of the signature by using its constructor. If desired, modify the appearance of the signature by setting one of its data members.
• A System.Boolean object that specifies whether to perform revocation checking on the signer's certificate. If this revocation checking is done, it is embedded in the signature (the default for this parameter is false).
• A System.Boolean object that specifies whether revocation checking information is specified. If this revocation checking is done, it is embedded in the signature (the default for this parameter is false).
• A System.Boolean object that specifies whether the signature field being certified is locked. If the field is locked, the signature field is marked as read only and its properties can not be modified and it can not be cleared by anyone who does not have the required permissions. The default setting is false, which means that signature field is not locked.
• A System.Boolean object that specifies whether the signature field is locked. That is, if you pass true to the previous parameter, then pass true to this parameter.
• An OCSPPreferences object that stores preferences for online certificate status protocol (OCSP) support, which provides information about the status of the credential that is used to certify the PDF document. If revocation checking is not done, then this parameter is not used and you can specify null.
• A CRLPreferences object that stores certificate revocation list (CRL) preferences. If revocation checking is not done, then this parameter is not used and you can specify null.
• A TSPPreferences object that stores preferences for time stamp provider (TSP) support. For example, after you create a TSPPreferences object, you can set the URL of the TSP by setting the TSPPreferences object’s tspServerURL data member. This parameter is optional and can be null.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the PDF document that will contain the certified PDF document and the mode in which to open the file.
• Create a byte array that stores the content of the BLOB object that was returned by the certify method. Populate the byte array by getting the value of the BLOB object’s binaryData data member.
• Create a System.IO.BinaryWriter object by invoking its constructor and passing the System.IO.FileStream object.
• Write the contents of the byte array to a PDF file by invoking the System.IO.BinaryWriter object’s Write method and passing the byte array.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/signaturesCertify.89.4.html