Take a survey

Developing Applications Using APIs > Digitally Signing and Certifying Documents > Adding Signature Fields > Adding signature fields using the web service API

Adding signature fields using the web service API
To add a signature field using the Signature service web service API, perform the following tasks:
1.
2.
Using the Microsoft .NET client assembly, create a SignatureServiceService object by invoking its default constructor.
3.
Create a BLOB object by using its constructor. The BLOB object is used to store the PDF document that will contain a signature field.
Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the PDF document 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 property with the contents of the byte array.
4.
Add a signature field to the PDF document by invoking the SignatureServiceService object’s addSignatureField method and passing the following values:
A BLOB object that represents the PDF document to which a signature field is added.
A PositionRect object that specifies the location of the signature field.
A FieldMDPOptions object that specifies fields within the PDF document that are locked once a digital signature is applied to the signature field. This parameter value is optional and you can pass null.
A PDFSeedValueOptions object that specifies various run-time values. This parameter value is optional and you can pass null.
The addSignatureField method returns a BLOB object that represents a PDF document that contains a signature field.
5.
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 signature field 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 addSignatureField 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.
View Quick Start
 

 

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/signaturesAddFields.87.4.html