PDF Digital Signature

A PDF digital signature enables you to authenticate a PDF file to establish that the sender of the file is who they say they are and the content of the PDF file has not been tampered with.

The following example shows how to create a digitally signed PDF file.

To view and verify the signature in Acrobat Reader, go to the menu button 'View', then expand 'Show/Hide' and 'Navigation Panes', and click 'Signatures'.

Certificate file: GemBoxSampleExplorer.pfx.

PDF Digital Signature Screenshot

See the full code below, use Run Example to execute.

Upload your file(Drag files here)

Download an input file

using GemBox.Spreadsheet;
using System.IO;

class Sample
    static void Main(string[] args)
        // If using Professional version, put your serial key below.

        ExcelFile ef = ExcelFile.Load("SimpleTemplate.xlsx");

        string pathToResources = "Resources";

        var options = new PdfSaveOptions()
            DigitalSignature =
                CertificatePath = Path.Combine(pathToResources, "GemBoxSampleExplorer.pfx"),
                CertificatePassword = "GemBoxPassword"

        ef.Save("PDF Digital Signature.pdf", options);
Imports GemBox.Spreadsheet
Imports System.IO

Module Samples

    Sub Main()

        ' If using Professional version, put your serial key below.

        Dim ef As ExcelFile = ExcelFile.Load("SimpleTemplate.xlsx")

        Dim pathToResources As String = "Resources"

        Dim options = New PdfSaveOptions()
        Dim digitalSignature = options.DigitalSignature

        digitalSignature.CertificatePath = Path.Combine(pathToResources, "GemBoxSampleExplorer.pfx")
        digitalSignature.CertificatePassword = "GemBoxPassword"

        ef.Save("PDF Digital Signature.pdf", options)

    End Sub

End Module