Skip to main content

PdfSaveOptions.Signature Property

Gets or sets the signature, which can contain signing info, reason and location, to be used to save the signed document.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v23.2.Core.dll

NuGet Package: DevExpress.Pdf.Core


public PdfSignature Signature { get; set; }

Property Value

Type Description

A PdfSignature object that represents the PDF signature.


Use the Signature property to specify the PDF signature as an argument of the PdfDocumentProcessor.SaveDocument method to save the signed document.


This example illustrates how to add a visual signature to a PDF document.

To accomplish this task, do the following:

using DevExpress.Pdf;
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;

namespace PDFSignature {
    class Program {
        static void Main(string[] args) {

            // Create a PDF document processor.
            using (PdfDocumentProcessor documentProcessor = new PdfDocumentProcessor()) {

                // Load a PDF document. 

                // Create a visual signature using certificate, image data, and specifying  page number, signature bounds and rotation angle. 
                X509Certificate2 certificate = new X509Certificate2(@"..\..\SignDemo.pfx", "dxdemo");
                byte[] imageData = File.ReadAllBytes("..\\..\\Signature.png");
                int pageNumber = 1;
                int angleInDegrees = 45; 
                double angleInRadians = angleInDegrees * (Math.PI / 180);
                PdfOrientedRectangle signatureBounds = new PdfOrientedRectangle(new PdfPoint(620, 210), 250, 90, angleInRadians);
                PdfSignature signature = new PdfSignature(certificate, imageData, pageNumber, signatureBounds);

                // Specify signing location, contact info and reason.
                signature.Location = "USA";
                signature.ContactInfo = "";
                signature.Reason = "Approved";

                // Save the signed document.
                documentProcessor.SaveDocument(@"..\..\SignedDocument.pdf", new PdfSaveOptions() { Signature = signature });
See Also