Class PdfCertificateField
Specifies the field type of PdfCertificate
Inheritance
System.Object
PdfCertificateField
Namespace: Syncfusion.Pdf.Parsing
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public sealed class PdfCertificateField : Enum
Examples
//Loads the input PDF
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Load the signature field.
PdfLoadedSignatureField signatureField = ldoc.Form.Fields[0] as PdfLoadedSignatureField;
//Get the signed name.
string signedName = signatureField.Signature.SignedName;
//Get the signed date
DateTime signedDate = signatureField.Signature.SignedDate;
//Get the country name of the subject
string subjectCountry = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, PdfCertificateField.Subject);
//Get the organization name of the subject
string subjectOrganization = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Organization, PdfCertificateField.Subject);
//Get the organization unit name of the subject
string subjectOrganizationUnit = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.OrganizationUnit, PdfCertificateField.Subject);
//Get the country name of the issuer
string issuerCountry = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, PdfCertificateField.Issuer);
//Get the organization name of the issuer
string issuerOrganization = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Organization, PdfCertificateField.Issuer);
//Get the organization unit name of the issuer
string issuerOrganizationUint = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.OrganizationUnit, PdfCertificateField.Issuer);
ldoc.Close(true);
'Loads the input PDF
Dim ldoc As New PdfLoadedDocument("input.pdf")
'Load the signature field.
Dim signatureField As PdfLoadedSignatureField = TryCast(ldoc.Form.Fields(0), PdfLoadedSignatureField)
'Get the signed name.
Dim signedName As String = signatureField.Signature.SignedName
'Get the signed date
Dim signedDate As DateTime = signatureField.Signature.SignedDate
'Get the country name of the subject
Dim subjectCountry As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, PdfCertificateField.Subject)
'Get the organization name of the subject
Dim subjectOrganization As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Organization, PdfCertificateField.Subject)
'Get the organization unit name of the subject
Dim subjectOrganizationUnit As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.OrganizationUnit, PdfCertificateField.Subject)
'Get the country name of the issuer
Dim issuerCountry As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, PdfCertificateField.Issuer)
'Get the organization name of the issuer
Dim issuerOrganization As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Organization, PdfCertificateField.Issuer)
'Get the organization unit name of the issuer
Dim issuerOrganizationUint As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.OrganizationUnit, PdfCertificateField.Issuer)
ldoc.Close(True)
Fields
Issuer
Specifies the issuer of the Certificate
Declaration
public const PdfCertificateField Issuer
Field Value
Type |
---|
PdfCertificateField |
Subject
Specifies the subject of the Certificate
Declaration
public const PdfCertificateField Subject
Field Value
Type |
---|
PdfCertificateField |