Class PdfCertificateDistinguishedName
Specifies the distinguished names of PdfCertificate
Inheritance
System.Object
PdfCertificateDistinguishedName
Namespace: Syncfusion.Pdf.Security
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfCertificateDistinguishedName : Object
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 Email name of the subject.
string emailSubject = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Email, PdfCertificateField.Subject);
//Get the DomainComponent of the subject
string DCSubject = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.DomainComponent, PdfCertificateField.Subject);
//Get the Given Name of the subject
string GivenNameSubject = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.GivenName, PdfCertificateField.Subject);
//Get the Serial Number of subject
string SerialNumber = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.SerialNumber, PdfCertificateField.Subject);
//Get the State name of subject
string State = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.State, PdfCertificateField.Subject);
//Get the Street name of subject
string Street = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Street, PdfCertificateField.Subject);
//Get the SurName name of subject
string SurName = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.SurName, PdfCertificateField.Subject);
//Get the Title of subject
string Title = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Title, PdfCertificateField.Subject);
//Get the UserID of subject
string UserID = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.UserID, PdfCertificateField.Subject);
//Get the country name of the issuer
string issuerCountry = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, 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 Email name of the subject.
Dim emailSubject As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Email, PdfCertificateField.Subject)
'Get the DomainComponent of the subject
Dim DCSubject As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.DomainComponent, PdfCertificateField.Subject)
'Get the Given Name of the subject
Dim GivenNameSubject As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.GivenName, PdfCertificateField.Subject)
'Get the Serial Number of subject
Dim SerialNumber As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.SerialNumber, PdfCertificateField.Subject)
'Get the State name of subject
Dim State As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.State, PdfCertificateField.Subject)
'Get the Street name of subject
Dim Street As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Street, PdfCertificateField.Subject)
'Get the SurName name of subject
Dim SurName As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.SurName, PdfCertificateField.Subject)
'Get the Title of subject
Dim Title As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Title, PdfCertificateField.Subject)
'Get the UserID of subject
Dim UserID As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.UserID, PdfCertificateField.Subject)
'Get the country name of the issuer
Dim issuerCountry As String = signatureField.Signature.Certificate.GetValue(PdfCertificateDistinguishedName.Country, PdfCertificateField.Issuer)
ldoc.Close(True)
Constructors
PdfCertificateDistinguishedName()
Declaration
public PdfCertificateDistinguishedName()
Fields
Country
Represent the country name
Declaration
public const string Country = "C"
Field Value
Type |
---|
System.String |
DomainComponent
Represent the Domain Component
Declaration
public const string DomainComponent = "DC"
Field Value
Type |
---|
System.String |
Represent the Email address
Declaration
public const string Email = "E"
Field Value
Type |
---|
System.String |
GivenName
Represent the Given name
Declaration
public const string GivenName = "G"
Field Value
Type |
---|
System.String |
Locality
Represent the Locality name
Declaration
public const string Locality = "L"
Field Value
Type |
---|
System.String |
Organization
Represent the Organization name
Declaration
public const string Organization = "O"
Field Value
Type |
---|
System.String |
OrganizationUnit
Represent the Organization unit name
Declaration
public const string OrganizationUnit = "OU"
Field Value
Type |
---|
System.String |
SerialNumber
Represent the SerialNumber
Declaration
public const string SerialNumber = "SERIALNUMBER"
Field Value
Type |
---|
System.String |
State
Represent the State name
Declaration
public const string State = "S"
Field Value
Type |
---|
System.String |
Street
Represent the Street name
Declaration
public const string Street = "STREET"
Field Value
Type |
---|
System.String |
SurName
Represent the Locality name
Declaration
public const string SurName = "SN"
Field Value
Type |
---|
System.String |
Title
Represent the Title name
Declaration
public const string Title = "T"
Field Value
Type |
---|
System.String |
UserID
Represent the User ID
Declaration
public const string UserID = "UID"
Field Value
Type |
---|
System.String |