|
|
using System;using System.Collections;using System.ComponentModel;using System.Data;using System.IO ;namespace ClearSignatureField{class Class1{[STAThread]static void Main(string[] args){try{//Create a SignatureServiceService client objectSignatureServiceService signClient = new SignatureServiceService();signClient.Credentials = new System.Net.NetworkCredential("administrator", "password");//Create a BLOB objectBLOB inDoc = new BLOB();//Specify a PDF document that contains a digital signaturestring path = "C:\\Adobe\\Loan.pdf";FileStream fs = new FileStream(path, FileMode.Open);//Get the length of the file streamint len = (int)fs.Length;byte[] ByteArray=new byte[len];//Populate the byte array with the contents of the FileStream objectfs.Read(ByteArray, 0, len);inDoc.binaryData = ByteArray;//Specify the name of the signature fieldstring fieldName = "SignatureField1[0]";//Clear the signature fieldBLOB signedDoc = signClient.clearSignatureField(inDoc,fieldName);//Populate a byte array with a BLOB databyte[] outByteArray=signedDoc.binaryData;//Create a new file instancestring fileName ="C:\\Adobe\\Loan.pdf" ;FileStream fs2 = new FileStream(fileName, FileMode.OpenOrCreate);//Create a BinaryWriter objectBinaryWriter w = new BinaryWriter(fs2);w.Write(outByteArray);w.Close();fs2.Close();}catch (Exception ee){Console.WriteLine(ee.Message);}}}}
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/quickStarts_Signatures.16.13.html