Get document information

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.Merger 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-merger -- dnx GroupDocs.Merger.Mcp --yes
Folders, licensing and more →

GroupDocs.Merger allows to get document information which includes:

  • Type - indicates document file type, extension, format name etc.
  • PageCount - indicates count of pages for text processing document, worksheets in a spreadsheet or slides in a presentation;
  • Page info - describes properties for each document page. For example, height and width in pixels when document page is previewed as image, page number, visibility etc.

The following code sample demonstrates how to get document information.

using (Merger merger = new Merger(@"c:\sample.vsdx"))
{
    IDocumentInfo info = merger.GetDocumentInfo();
    Console.WriteLine(info);
}