MetadataGetDocumentInfo Method
Gets common information about the loaded document.

Namespace: GroupDocs.Metadata
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 20.9
Syntax
public IDocumentInfo GetDocumentInfo()

Return Value

Type: IDocumentInfo
An object representing common document information.
Remarks
Examples
This example demonstrates how to extract basic format information from a file.
C#
using (Metadata metadata = new Metadata(Constants.InputXlsx))
{
    if (metadata.FileFormat != FileFormat.Unknown)
    {
        IDocumentInfo info = metadata.GetDocumentInfo();
        Console.WriteLine("File format: {0}", info.FileType.FileFormat);
        Console.WriteLine("File extension: {0}", info.FileType.Extension);
        Console.WriteLine("MIME Type: {0}", info.FileType.MimeType);
        Console.WriteLine("Number of pages: {0}", info.PageCount);
        Console.WriteLine("Document size: {0} bytes", info.Size);
        Console.WriteLine("Is document encrypted: {0}", info.IsEncrypted);
    }
}
See Also