ParserGetMetadata Method
Extracts metadata from the document.

Namespace: GroupDocs.Parser
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 22.8.0
public IEnumerable<MetadataItem> GetMetadata()

Return Value

Type: IEnumerableMetadataItem
A collection of metadata items; null if metadata extraction isn't supported.

The following example shows how to extract metadata from a document:

// Create an instance of Parser class
using(Parser parser = new Parser(filePath))
    // Extract metadata from the document
    IEnumerable<MetadataItem> metadata = parser.GetMetadata();
    // Check if metadata extraction is supported
    if(metadata == null)
        Console.WriteLine("Metatada extraction isn't supported");

    // Iterate over metadata items
    foreach(MetadataItem item in metadata)
        // Print an item name and value
        Console.WriteLine(string.Format("{0}: {1}", item.Name, item.Value));
See Also