CryptographicStandard
16 Dec 20251 minute to read
Public enum specifies the cryptographic standard.
//Load the document
let document: PdfDocument = new PdfDocument(data);
// Gets the first page of the document
let page: PdfPage = document.getPage(0);
// Access the PDF form
let form: PdfForm = document.form;
// Create a new signature field
let field: PdfSignatureField = new PdfSignatureField(page, 'Signature', {x: 10, y: 10, width: 100, height: 50});
// Create a new signature using PFX data and specify cms as the cryptographicStandard
const sign: PdfSignature = PdfSignature.create({ cryptographicStandard: CryptographicStandard.cms }, certData, password);
// Sets the signature to the field
field.setSignature(sign);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
cades- Specifies CMS Advanced Electronic Signatures -
cms- Specifies Cryptographic Message Syntax