1. GroupDocs Documentation
  2. /
  3. GroupDocs.Viewer Product Family
  4. /
  5. GroupDocs.Viewer for Python via .NET

GroupDocs.Viewer for Python via .NET

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.Viewer 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-viewer -- dnx GroupDocs.Viewer.Mcp --yes
Folders, licensing and more →
groupdocs-viewer-python-net-home PyPI package PyPI downloads

Release notes Download from PyPI Online app

GroupDocs.Viewer for Python via .NET is a high-performance document rendering library that lets you view 190+ file formats — including DOCX, XLSX, PPTX, PDF, CAD drawings, emails, archives, and images — by rendering them to HTML, PDF, PNG, or JPG, to files or to memory. No third-party software required, and the groupdocs-viewer command opens documents in your browser.

Quick example

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions

# Render a DOCX file to HTML with embedded resources
with Viewer("sample.docx") as viewer:
    viewer.view(HtmlViewOptions.for_embedded_resources("page_{0}.html"))

sample.docx is the sample file used in this example. Click here to download it.

page_1.html (253 KB)
page_2.html (110 KB)
page_3.html (148 KB)
page_4.html (1001 KB)
page_5.html (86 KB)

Download full output

Features

  • 190+ File Formats: Render Microsoft Office, PDF, HTML, CAD, email, archives, images, and more.
  • Multiple Output Formats: Render documents to HTML, PDF, PNG, and JPG.
  • Embedded or External Resources: Produce self-contained HTML pages or HTML with separate CSS, fonts, and images.
  • Rendering to Memory: Write pages and resources to BytesIO objects or your own streams instead of files.
  • Cancellation: Stop a long render from another thread or after a time limit.
  • Browser Viewer: The groupdocs-viewer command opens a document, or a whole folder, in the GroupDocs.Viewer UI on your machine.
  • Format Detection: Automatically detects the format of input files.
  • Cross-Platform: Works on Windows, Linux, and macOS.

Supported File Formats

GroupDocs.Viewer supports a wide range of file formats. For a complete list, see the full list of supported formats.

  • Microsoft Office (Word, Excel, PowerPoint)
  • PDF (Standard PDFs, PDF/A)
  • OpenDocument (ODT, ODS, ODP)
  • Images (JPEG, PNG, TIFF, GIF, BMP, PSD)
  • Email (EML, MSG, PST, OST)
  • eBook (EPUB, MOBI)
  • Text/Markdown (TXT, MD)
  • HTML/Web (HTML, MHTML, CHM)
  • AutoCAD (DWG, DXF, DWF)
  • Archives (ZIP, RAR, 7Z)

Getting Started

To get started, refer to the System Requirements, Supported File Formats, Installation, and Hello, World! sections for setup instructions and your first rendering, and to View documents in the browser to open files without writing code.

Developer Guide

For practical code examples and explanations of basic and advanced rendering functions, see the Developer Guide section. This guide includes instructions on loading documents, retrieving document metadata, and performing document rendering.

AI Agents & LLM Integration

Using an AI coding assistant? The AI Agents & LLM Integration page covers the bundled AGENTS.md reference, the GroupDocs MCP servers, and machine-readable documentation. SDK, Cloud or MCP? compares the ways to render documents from Python.

Technical Support

If you experience any issues or have suggestions, please refer to the Technical Support topic. This topic provides multiple support channels tailored to your needs.