PdfXmpMetadata

6 Jul 20261 minute to read

Represents the container for all XMP metadata in a PDF document.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Create XMP metadata
let documentProperties: PdfDocumentInformation = document.getDocumentInformation(false);
// Gets XMP metadata
let xmp: PdfXmpMetadata = documentProperties.xmpMetadata;
// Sets basic schema properties
xmp.basicSchema.creatorTool = 'MyApp 1.0';
xmp.basicSchema.createDate = new Date();
// Sets Dublin Core properties
xmp.dublinCoreSchema.title = {'en-US': 'My Document'};
xmp.dublinCoreSchema.creator = ['John Doe'];
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Properties

xmpStream Uint8Array

The stream contains the serialized XMP metadata packet.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Create XMP metadata
let documentProperties: PdfDocumentInformation = document.getDocumentInformation(false);
// Gets XMP metadata
let xmp: PdfXmpMetadata = documentProperties.xmpMetadata;
// Access the xmp stream data
let stream = xmp.xmpStream;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Get basicJobTicketSchema PdfBasicJobTicketSchema

Gets or creates the Basic Job Ticket schema.

Get basicSchema PdfBasicSchema

Gets or creates the Basic XMP schema.

Get dublinCoreSchema PdfDublinCoreSchema

Gets or creates the Dublin Core metadata schema.

Get pagedTextSchema PdfPagedTextSchema

Gets or creates the Paged-Text metadata schema.

Get pdfSchema PdfSchema

Gets or creates the PDF-specific metadata schema.

Get rightsManagementSchema PdfRightsManagementSchema

Gets or creates the Rights Management schema.