Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfMetadata Class

Represents global information about the document such as the document’s title, author, and creation and modification dates.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v24.2.Core.dll

NuGet Package: DevExpress.Pdf.Core

#Declaration

public class PdfMetadata :
    PdfObject

The following members return PdfMetadata objects:

#Remarks

Metadata in a PDF document is stored in the Extensible Metadata Platform (XMP) format.

Read Tutorial: Embed XMP Metadata in a PDF Document

Use the XmpDocument.FromString method to convert the retrieved data to an XMP packet, as shown in the example below.

using DevExpress.Pdf;
using DevExpress.Pdf.Xmp;
//...

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
    PdfDocument document = pdfDocumentProcessor.Document;

    string metadata = document.Metadata.Data;
    XmpDocument xmpDocument =  XmpDocument.FromString(metadata);
}

#Inheritance

Object
DevExpress.Pdf.Native.PdfDocumentItem
DevExpress.Pdf.Native.PdfObject
PdfMetadata
See Also