PDF Signature

The Documentize PDF Signature for .NET plugin allows users to digitally sign PDF documents. It offers a streamlined process for adding signatures, ensuring authenticity, and securing PDF content. The plugin supports both visible and invisible signatures and provides options to customize the signature’s position, reason, contact information, and more.

How to Sign PDF Documents

To sign a PDF document using a PFX file, follow these steps:

  1. Instantiate the SignOptions class with the PFX file path and password.
  2. Add the input PDF and the output file to the options.
  3. Run the Process method to apply the signature.
1// Create SignOptions object to set instructions
2var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
7// Perform the process
8Signature.Process(options);

How to Use Stream for PFX File

You can also sign a PDF using a PFX certificate provided as a stream instead of a file path. This allows more flexible handling of certificate storage.

  1. Instantiate SignOptions with a stream containing the PFX and the password.
  2. Add the input and output files.
  3. Run the Process method to apply the signature.
1using var pfxStream = File.OpenRead(@"path_to_your_pfx_file.pfx");
2var options = new SignOptions(pfxStream, "password_of_your_pfx_file");
3options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
4options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
5// Perform the process
6Signature.Process(options);

How to Apply Invisible Signatures

To add an invisible signature (one that secures the document without displaying the signature on the document), simply set the Visible property to false.

  1. Create an instance of SignOptions.
  2. Set Visible to false.
  3. Add input and output files.
  4. Call Process to apply the invisible signature.
1var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
2options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
3options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
4// Configure invisible signature
5signOptions.Visible = false;
6// Perform the process
7Signature.Process(options);

How to use extra Options for signature of PDF Documents

You can use extra options during adding signature to a PFX file like Reason, Contact, Location, PageNumber.

  1. Instantiate the SignOptions class with the PFX file path and password.
  2. Add the input PDF and the output file to the options.
  3. Set values for your options.
  4. Run the Process method to apply the signature.
 1var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
 2options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
 3options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
 4// Optional parameters
 5options.Reason = "my Reason";
 6options.Contact = "my Contact";
 7options.Location = "my Location";
 8options.PageNumber = 3;
 9// Perform the process
10Signature.Process(options);

Key Features:

  • Digitally Sign PDF Documents: Secure your documents with visible or invisible digital signatures.
  • PFX Support: Sign PDF files using a PFX certificate.
  • Customizable Options: Configure signature settings like reason, location, and contact details.
  • Visible and Invisible Signatures: Choose whether the signature is visible on the document.
 English