Gets the list of DocumentSignature objects that has the signature information for DocumentSignatureFormField objects.
[DataMemberAttribute(Name="signatures")]
public IList<DocumentSignature> Signatures { get; }
public:
[DataMemberAttribute(Name=L"signatures")]
property IList<DocumentSignature^>^ Signatures
{
IList<DocumentSignature^>^ get()
}
Signatures # get (DocumentFormFieldResources)
The list of DocumentSignature objects that has the signature information for DocumentSignatureFormField objects.
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;
}
}
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.regex.Pattern;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.annotations.engine.*;
import leadtools.barcode.*;
import leadtools.caching.*;
import leadtools.codecs.*;
import leadtools.document.*;
import leadtools.document.DocumentMimeTypes.UserGetDocumentStatusHandler;
import leadtools.document.converter.*;
import leadtools.document.writer.*;
import leadtools.ocr.*;
public void documentSignatureExample() {
final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images";
String pdfFile = combine(LEAD_VARS_IMAGES_DIR, "leadtools.pdf");
RasterCodecs codecs = new RasterCodecs();
RasterImage initialImage = codecs.load(combine(LEAD_VARS_IMAGES_DIR,
"leadtools.pdf"));
RasterImage signatureImage = codecs.load(combine(LEAD_VARS_IMAGES_DIR,
"leadtools.pdf"));
// Load the document
System.out.println("Loading with DocumentLoadFormFieldsMode.Interactive");
LoadDocumentOptions loadDocumentOptions = new LoadDocumentOptions();
loadDocumentOptions.setLoadFormFieldsMode(DocumentLoadFormFieldsMode.INTERACTIVE);
LEADDocument document = DocumentFactory.loadFromFile(pdfFile,
loadDocumentOptions);
document.setReadOnly(false);
System.out.println("Document has " + document.getPages().size() + " pages");
// Create a signature
DocumentFormFieldResources resources = new DocumentFormFieldResources();
// DocumentSignature reference
DocumentSignature signatureData = resources.createSignature();
signatureData.setInitialsImage(initialImage);
signatureData.setSignatureImage(signatureImage);
signatureData.setSignerInitials("JD");
signatureData.setSignerName("John Doe");
resources.getSignatures().add(signatureData);
document.getFormFields().setResources(resources);
// Create form fields container
DocumentFormFieldsContainer formFieldsContainer = new DocumentFormFieldsContainer();
formFieldsContainer.setPageNumber(1);
// Initialize an initials field
DocumentSignatureFormField initialsField = new DocumentSignatureFormField();
initialsField.setSignatureType(DocumentSignatureFormField.SIGNATURE_TYPE_INITIALS);
initialsField.setSignerID(signatureData.getSignerID()); // Links the
// signature form field with a signature resource
initialsField.setSigned(true);
initialsField.setBounds(new LeadRectD(0, 0, 400, 400));
// Initialize an signature field
DocumentSignatureFormField signatureField = new DocumentSignatureFormField();
signatureField.setSignatureType(DocumentSignatureFormField.SIGNATURE_TYPE_SIGNATURE);
signatureField.setSignerID(signatureData.getSignerID()); // Links the
// signature form field with a signature resource
signatureField.setSigned(true);
signatureField.setBounds(new LeadRectD(600, 600, 800, 400));
formFieldsContainer.getChildren().add(initialsField);
formFieldsContainer.getChildren().add(signatureField);
document.getFormFields().getResources();
// Update the form fields containers
document.getFormFields().setFormFields(new DocumentFormFieldsContainer[] {
formFieldsContainer });
document.setReadOnly(true);
}
DocumentFormFieldResources Class
DocumentFormFieldResources Members
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document