Pdf | |
The PdfDigitalCertificatesStore type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfDigitalCertificatesStore |
| Name | Description | |
|---|---|---|
| GetCertificates | Gets the certificates collection from the Personal Certificates store. | |
| GetCertificates(PdfCertificateSystem) | Gets the certificates collection from the specified system certificates store. | |
| GetCertificates(String) | Gets the certificates collection from the specified PKCS#12 file, using a null password. | |
| GetCertificates(String, String) | Gets the certificates collection from the specified password protected PKCS#12 file. |
// Load a signing certificate from a password-protected PFX file PdfDigitalCertificatesCollection certs = PdfDigitalCertificatesStore.GetCertificates(@"C:\certs\signer.pfx", "secret"); // A .pfx usually carries the signing certificate AND its issuing chain. // The certificates that can sign come first, so certs[0] is the one to sign // with; name it when you can. PdfDigitalCertificate cert = certs.GetCertBySubject("Your Company") ?? certs[0]; // Or read the current user's Personal certificates store PdfDigitalCertificatesCollection personal = PdfDigitalCertificatesStore.GetCertificates();