Pdf - PdfSubjectAlternativeNameType
18 Nov 20261 minute to read
Specifies the type of identity or location represented by a Subject Alternative Name entry in an X.509 certificate.
// Load an existing signed PDF document
const document: PdfDocument = new PdfDocument(data);
// Retrieve the signature field
const field: PdfSignatureField = document.form.fieldAt(0) as PdfSignatureField;
// Retrieve the digital signature
const signature: PdfSignature = field.getSignature();
// Retrieve the signing certificate information
const certificate: PdfCertificateInformation = signature.getCertificateInformation();
// Retrieve the Subject Alternative Name entries
const alternativeNames: PdfSubjectAlternativeName[] = certificate.subjectAlternativeNames;
// Retrieve each alternative-name type and value
for (const alternativeName of alternativeNames) {
const type: PdfSubjectAlternativeNameType = alternativeName.type;
const value: string = alternativeName.value;
}
// Destroy the document
document.destroy();-
directoryName- Specifies a directory name. -
dnsName- Specifies a DNS name. -
ipAddress- Specifies an IP address. -
otherName- Specifies an other-name entry. -
registeredIdentifier- Specifies a registered object identifier. -
rfc822Name- Specifies an RFC822 email address. -
uniformResourceIdentifier- Specifies a URI.