Skip to content

Latest commit

 

History

History
24 lines (12 loc) · 1.76 KB

File metadata and controls

24 lines (12 loc) · 1.76 KB

PDF Document API - How to sign PDF documents with a certificate stored on a user's hardware device

The DevExpress PDF Document API library allows you to retrieve a certificate from a hardware device (Windows certificate store, SmartCard, USB Token, etc.). This example demonstrates how to use a certificate stored on a user's machine. You can also adapt this solution to sign documents using certificates from any physical store.

Implementation Details

First, you need to obtain a certificate from a Windows certificate store. In this example, the System.Security.Cryptography.X509Certificates.X509Certificate2UI class is used to display a system dialog for viewing and selecting an X.509 certificate. Create a Pkcs7Signer object using the Pkcs7Signer(X509Certificate2) constructor and pass the retrieved certificate to it. Use this class to sign a PDF document.

Files to Look At

Program.cs

Documentation

More Examples