-
Notifications
You must be signed in to change notification settings - Fork 1
2.27 XMP Metadata
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)
This page is a copy from https://www.codeproject.com/Articles/570682/PDF-File-Writer-Csharp-Class-Library by Uzi Granot. The article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL). All rights to the texts and source code remain with Uzi Granot.