using System.Drawing;
using Vintasoft.Imaging.Pdf;
/// <summary>
/// Adds an empty signature field to a PDF page.
/// </summary>
public class PdfPageDigitalSignatureHelper_EmptySignatureField
{
public static void Run()
{
// create a helper that alows to add digital signature to a PDF document
PdfPageDigitalSignatureHelper digitalSignatureHelper =
new PdfPageDigitalSignatureHelper(null, new RectangleF(20, 20, 250, 100));
// set the appearance for signature field
digitalSignatureHelper.SignatureText = "Add your signature here";
digitalSignatureHelper.SignatureBackgoundColor = Color.Yellow;
// open PDF document
using (PdfDocument document = new PdfDocument("TestDocumentToSign.pdf"))
{
// add signature field to the first PDF page
digitalSignatureHelper.AddEmptySignatureField(document.Pages[0]);
// save PDF document to the output file
document.SaveChanges("TestDocumentToSign-output.pdf");
}
}
}
Forum 'Code samples'
Code samples for VintaSoft PDF .NET Plug-in. Here you can request a code sample.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions < Code samples
