ImageGear v26.5 - Updated
Developer Guide / How to Work with ... / PDF / How to... / Manage PDF Content / Manage PDF Metadata
In This Topic
    Manage PDF Metadata
    In This Topic

    You can get and set PDF document metadata corresponding to a document's Info dictionary.

    You can also get and set the XMP metadata associated with a PDF or PostScript document. See the Metadata section for more information about the XMP metadata support in PDF and PostScript.

    To manage PDF metadata you can use the GetInfo and SetInfo methods of ImGearPDFDocument. The following example illustrates the usage of these methods:

    C#

    public void SetMetadata(ImGearPDFDocument igPDFDocument)
    {
        // If empty, set the dictionary key "Author" to "Accusoft."
        if (igPDFDocument.GetInfo("Author") == "")
            igPDFDocument.SetInfo("Author", "Accusoft");
        return;
    }