Get document info

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Markdown MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-markdown -- dnx GroupDocs.Markdown.Mcp --yes
Folders, licensing and more →

Use GetDocumentInfo() or the static GetInfo() method to retrieve document metadata without performing a full conversion. This is useful for building file browsers, validation pipelines, and pre-conversion UIs.

Using static method

using GroupDocs.Markdown;

DocumentInfo info = MarkdownConverter.GetInfo("business-plan.docx");

Console.WriteLine($"Format:    {info.FileFormat}");    // Docx
Console.WriteLine($"Pages:     {info.PageCount}");     // 42
Console.WriteLine($"Title:     {info.Title}");         // "Q3 Report"
Console.WriteLine($"Author:    {info.Author}");        // "Jane Doe"
Console.WriteLine($"Encrypted: {info.IsEncrypted}");   // false

business-plan.docx is a sample file used in this example. Click here to download it.

Format:    Docx
Pages:     5
Title:     Meridian Outdoor Co. - Business Plan
Author:    Meridian Outdoor Co.
Encrypted: False

Download full output

Using instance method

using GroupDocs.Markdown;

using var converter = new MarkdownConverter("cost-analysis.xlsx");
DocumentInfo info = converter.GetDocumentInfo();

Console.WriteLine($"Format:    {info.FileFormat}");
Console.WriteLine($"Pages:     {info.PageCount}");
Console.WriteLine($"Title:     {info.Title}");
Console.WriteLine($"Author:    {info.Author}");
Console.WriteLine($"Encrypted: {info.IsEncrypted}");

cost-analysis.xlsx is a sample file used in this example. Click here to download it.

Format:    Xlsx
Pages:     4
Title:     
Author:    
Encrypted: False

Download full output

DocumentInfo properties

PropertyTypeDescription
FileFormatFileFormatDetected file format (e.g., FileFormat.Docx)
PageCountintNumber of pages or worksheets
TitlestringDocument title from metadata
AuthorstringDocument author from metadata
IsEncryptedboolWhether the document is password-protected