How to Sign PDF Document with QR Code in C#

This how-to guide explains the process to sign PDF document with QR Code in C#. We will also write a sample code to generate QR Code in C# by following the tutorial’s step-by-step instructions. Users can sign documents without the use of any third-party software. The detailed instructions and example for signing PDF documents using QR-Code signatures can be found below.

Steps to Sign PDF Document with QR Code in C#

  1. Setup GroupDocs.Signature for .NET package from NuGet.org website
  2. Add a reference to the necessary namespaces in the code
  3. Load the input PDF file by creating an instance of the Signature class
  4. Initialize QrCodeSignOptions class by creating an object of it
  5. Call the Sign method of the Signature class and pass the name of the output file along with signing options for the QR-Code

You can easily build the C# QR Code generator feature and use it to sign the PDF document by following the instructions above. Start by downloading the relevant package from the NuGet website and referencing the required namespaces in the code. Create an instance of the Signature class to load the source PDF file, and then initialize the QrCodeSignOptions class to set QR-Code signature options. Finally, sign the PDF document and save it to disc using the Sign method.

Code to Sign PDF Document with QR Code in C#

We have utilized the aforementioned steps to develop the feature for PDF documents to eSign in C# in the example above. In this example, we have defined the left, top, width, and height of the QR-Code. However, you can customize the QR-Code by setting the signing options such as border, background color, text color, and font.

 English