PdfCustomSchema

6 Jul 20261 minute to read

Represents a user-defined metadata schema with custom properties.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access the document properties
let documentProperties: PdfDocumentInformation = document.getDocumentInformation(false);
// Gets XMP metadata
let xmpMetadata: PdfXmpMetadata = documentProperties.xmpMetadata;
// Create a custom schema
let custom: PdfCustomSchema = new PdfCustomSchema(xmpMetadata, 'cust', 'http://custom.example.com/ns/');
custom.customData.set('appVersion', '1.0.0');
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Properties

Get customData Map

Gets the custom data map.

Set customData void

Sets the custom data map.

Parameter Type Description
value Map The custom data to set.

Get schemaType PdfXmpSchemaType

Gets the schema type.