This basic guide focuses on how to add digital signature to PDF in C#. The digital signing feature is useful to verify PDF contents as well as to avoid any modifications. These precise steps and the code sample explain how using C# add signature to PDF file.
Steps to Add Digital Signature to PDF in C#
- Add the reference to Aspose.PDF for .NET library to digitally sign PDF in your application
- Load the input PDF document and the certificate file in PKCS7 class object
- Set the rectangular coordinates on the page and the appearance image to place the signature
- Certify the PDF file to complete the document signing process
- Save the output PDF file having signature at the specified position
These steps clarify how using C# add signature to PDF file. You can customize the appearance image as handwritten signatures while loading the input image. Moreover, the certificate file is also required along with its password to certify the authenticity of the digital signatures.
Code to Add Digital Signature to PDF in C#
The code snippet above shows how using C# digitally sign PDF feature can be integrated into your applications. PdfFileSignature class object is used to work with different properties of the signatures. For example, revisions or user rights information, access permissions in order to add or remove the digital signatures from a PDF file, and so on.
In this article, we have learned how to add digital signature to PDF in C#. However, if you want to learn to protect the PDF files, please refer to the article on how to protect PDF with Password in C#.