Skip to content

2.27 XMP Metadata

OgreTransporter edited this page Mar 2, 2020 · 1 revision

The XMP file or byte array are embedded in a metadata stream contained in a PDF object. The XMP must be encoded as UTF-8. The PdfFileWriter includes the input file or input byte array as given by the user. The user must ensure the the XMP input is a valid metafile. The XMP stream is not compressed or encrypted. This allows readers to get the metadata information with little programming. You should include the XMP matadata shortly after the PdfDocument is created and before any image is loaded. By doing so the metadata will be at the start of the file and it will be readable by simple text editors.

// adding metadata
new PdfMatadata(Document, FileName);

// or
new PdfMetadata(Document, ByteArray);

Reference: Adobe’s Extensible Metadata Platform (XMP)

Clone this wiki locally