PDFOne .NET
Powerful all-in-one PDF library for .NET
Compatibility
VS 2005/2008/2010/2012/2013

How To Digitally Sign PDF Documents In .NET

Using PDFOne .NET and C#.
By V. Subhash

In PDFOne .NET Version 4.1, we introduced support for digital signing. In this article, we will see how to sign PDF documents using PDFOne .NET.

To sign PDF documents, you need a digital signature. Certificate Authorities (CA) provide you a PFX file for signing document. If you have this file and PDFOne .NET, you can start signing documents.

Just load a document, use one of the PDFDocument.AddSignature() overloads and save the signed document to a file or stream. It is very simple. (In the following C# code snippet, I have used a trial digital certificate from Ascertia.)

// Create a new document object
PDFDocument doc = new PDFDocument("your-license-key");

// Load an existing PDF
doc.Load("unsigned_doc.pdf");

// Add the signature
doc.AddSignature(
      "testmenow@mailinator.com.pfx",       // signature file
      "TestCase",                           // signature password
      "Approved",                           // reason
      "Ivory Tower",                        // location
      "I am in the book",                   // contact info
      1,                                    // page number
      "fldSign",                            // signature field name
      new RectangleF(4f, 4.8f, 2f, 0.4f));  // location

// Write signed document to file
doc.Save("signed_doc.pdf");

// Close the document
doc.Close();

Here is the signed document.

---o0O0o---

Our .NET Developer Tools
Gnostice Document Studio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
Gnostice Document Studio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
Gnostice Document Studio Java

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2025 Gnostice Information Technologies Private Limited. All rights reserved.