←Select platform

SignatureType Property

Summary

Signature field type.

Syntax

C#
C++/CLI
Python
[DataMemberAttribute(Name="signatureType")] 
public int SignatureType { get; set; } 
public:  
   [DataMemberAttribute(Name=L"signatureType")] 
   property Int32 SignatureType 
   { 
      Int32 get() 
      void set(Int32 value) 
   } 
SignatureType # get and set (DocumentSignatureFormField) 

Property Value

The signature field type.

Remarks

This value is used to define the type of the DocumentSignatureFormField. The following table lists the supported form field types:

Value Description
DocumentSignatureFormField.SignatureType_Initials Initials form field type
DocumentSignatureFormField.SignatureType_Signature Signature form field type

Example

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Document.Writer; 
 
using Leadtools.Document; 
using Leadtools.Caching; 
using Leadtools.Annotations.Engine; 
using Leadtools.Ocr; 
using Leadtools.Barcode; 
using Leadtools.Document.Converter; 
 
public void DocumentSignatureExample(string pdfFile, RasterImage initialImage, RasterImage signatureImage) 
{ 
   // Load the document 
   Console.WriteLine($"Loading with DocumentLoadFormFieldsMode.Interactive"); 
   var loadDocumentOptions = new LoadDocumentOptions(); 
   loadDocumentOptions.LoadFormFieldsMode = DocumentLoadFormFieldsMode.Interactive; 
   using (LEADDocument document = DocumentFactory.LoadFromFile(pdfFile, loadDocumentOptions)) 
   { 
      document.IsReadOnly = false; 
 
      Console.WriteLine($"Document has {document.Pages.Count} pages"); 
 
      // Create a signature 
      var resources = new DocumentFormFieldResources(); 
      // DocumentSignature reference 
      var signatureData = resources.CreateSignature(); 
      signatureData.InitialsImage = initialImage; 
      signatureData.SignatureImage = signatureImage; 
      signatureData.SignerInitials = "JD"; 
      signatureData.SignerName = "John Doe"; 
      resources.Signatures.Add(signatureData); 
      document.FormFields.SetResources(resources); 
 
      // Create form fields container 
      var formFieldsContainer = new DocumentFormFieldsContainer() 
      { 
         PageNumber = 1 
      }; 
 
      // Initialize an initials field 
      var initialsField = new DocumentSignatureFormField() 
      { 
         SignatureType = DocumentSignatureFormField.SignatureType_Initials, 
         SignerID = signatureData.SignerID, // Links the signature form field with a signature resource 
         Signed = true, 
         Bounds = new LeadRectD(0, 0, 400, 400) 
      }; 
      // Initialize an signature field 
      var signatureField = new DocumentSignatureFormField() 
      { 
         SignatureType = DocumentSignatureFormField.SignatureType_Signature, 
         SignerID = signatureData.SignerID, // Links the signature form field with a signature resource 
         Signed = true, 
         Bounds = new LeadRectD(600, 600, 800, 400) 
      }; 
      formFieldsContainer.Children.Add(initialsField); 
      formFieldsContainer.Children.Add(signatureField); 
 
      document.FormFields.GetResources(); 
 
      // Update the form fields containers 
      document.FormFields.SetFormFields(new DocumentFormFieldsContainer[] { formFieldsContainer }); 
 
      document.IsReadOnly = true; 
   } 
} 

Requirements

Target Platforms

See Also

DocumentSignatureFormField Class

DocumentSignatureFormField Members

Leadtools.Document Namespace

Help Version 22.0.2023.4.21
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.