GemBox.Spreadsheet is a .NET component that enables you to read, write, edit, convert, and print spreadsheet files from your .NET applications using one simple API.

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.

Screenshot
PDF Digital Signature Screenshot

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

Upload your file(Drag files here)

Download a sample file

using GemBox.Spreadsheet;
using System.IO;

class Sample
{
    [STAThread]
    static void Main(string[] args)
    {
        // If using Professional version, put your serial key below.
        SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");

        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.
        SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")

        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

Check next sample.