Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License
GroupDocs.Viewer for Python via .NET is a document rendering API that displays 190+ file formats — DOCX, PDF, XLSX, PPTX, CAD drawings, email messages, archives, and more — as HTML, PNG, JPG, or PDF. It preserves layout and formatting while offering per-format rendering options.
Get Started
pip install groupdocs-viewer-net
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions
with Viewer("document.docx") as viewer:
options = HtmlViewOptions.for_embedded_resources("page_{0}.html")
viewer.view(options)
How It Works
The package is a self-contained Python wheel (~160 MB) that includes everything needed to render documents. No external software installation is required — just pip install and start viewing. The wheel works across Python 3.5 – 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).
Features
- Wide Format Support: 190+ file formats across Microsoft Office, PDF, images, CAD, email, and archives.
- Flexible Output: Render to HTML (embedded or external resources), PNG, JPG, or PDF.
- Page Control: Render whole documents, selected pages, page ranges, or reordered pages.
- Custom Streams: Route each page or resource to a Python-provided stream factory — no disk writes required.
- Cross-Platform: Windows x64, Linux x64, macOS x64/ARM64.
Common Tasks
- Render DOCX, PDF, XLSX, or PPTX to HTML for an in-browser document viewer
- Generate per-page PNG or JPG thumbnails and previews
- Produce a print-ready PDF from any supported format
- View CAD drawings (DWG, DXF) without AutoCAD
- Display email messages (MSG, EML) together with their attachments
- Render specific pages, page ranges, or reordered pages
- Feed rendered HTML or page images into an AI / RAG document-preview pipeline
Supported File Formats
For a complete list, see supported formats.
- Microsoft Office (Word, Excel, PowerPoint, Visio, Project, Outlook)
- PDF (Standard PDFs, PDF/A)
- OpenDocument (ODT, ODS, ODP)
- Images (JPEG, PNG, TIFF, BMP, SVG, WebP, DICOM)
- Email (EML, MSG, PST, OST)
- eBook (EPUB, MOBI, AZW3)
- Archives (ZIP, TAR, RAR, 7Z)
- AutoCAD (DWG, DXF, DGN, IFC)
- Web (HTML, MHTML, CHM, XML)
Platform & Format Support
| Format family | Windows | Linux / macOS |
|---|---|---|
| Photoshop (PSD, PSB) | Yes | No |
| Adobe Illustrator (AI) | Yes | No |
| OneNote (ONE) | Yes | No |
| All other formats (Office, PDF, Visio, Project, CAD, images, email, archives, eBooks, web, …) | Yes | Yes |
Windows wheels run the Windows build of the engine; Linux and macOS wheels run its cross-platform build (GroupDocs.Viewer.Net60), which renders every format except Photoshop (PSD, PSB), Adobe Illustrator (AI) and OneNote — render those on Windows. Visio and, since 26.9, Microsoft Project (MPP, MPT, MPX) work on every platform.
Examples
Render DOCX to HTML (embedded resources)
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions
with Viewer("./document.docx") as viewer:
viewer.view(HtmlViewOptions.for_embedded_resources("./out/page_{0}.html"))
Render selected pages to PNG
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions
with Viewer("./document.pdf") as viewer:
viewer.view(PngViewOptions("./out/page_{0}.png"), page_numbers=[1, 3, 5])
Render with Advanced Options
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions, LoadOptions, Watermark
load_options = LoadOptions()
load_options.password = "12345"
with Viewer("./protected.docx", load_options) as viewer:
options = HtmlViewOptions.for_embedded_resources("./out/page_{0}.html")
options.watermark = Watermark("CONFIDENTIAL")
options.render_responsive = True
viewer.view(options)
Get View Info
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import ViewInfoOptions
with Viewer("./document.pdf") as viewer:
info = viewer.get_view_info(ViewInfoOptions.for_html_view())
print(f"Pages: {len(info.pages)}")
Render from Stream / BytesIO
import io
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions
with open("document.docx", "rb") as stream:
with Viewer(stream) as viewer:
viewer.view(HtmlViewOptions.for_embedded_resources("./out/page_{0}.html"))
buf = io.BytesIO(downloaded_bytes)
with Viewer(buf) as viewer:
viewer.view(HtmlViewOptions.for_embedded_resources("./out/page_{0}.html"))
Render to Custom Streams (no disk writes)
import io
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions
pages: dict[int, io.BytesIO] = {}
def create_page(page_number):
pages[page_number] = io.BytesIO()
return pages[page_number]
with Viewer("./document.docx") as viewer:
viewer.view(PngViewOptions(create_page))
# pages now holds {1: <BytesIO>, 2: <BytesIO>, ...}
AI Agent & LLM Friendly
This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.
AGENTS.mdin the package — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package- MCP server — connect your AI tool to GroupDocs documentation for on-demand API lookups:
{ "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
- Machine-readable docs — full documentation available as plain text for RAG and LLM context:
- Single file:
https://docs.groupdocs.com/viewer/python-net/llms-full.txt - Per page: append
.mdto any docs URL
- Single file:
Evaluation Mode
The API works without a license in evaluation mode with the following limitations:
- A watermark is added to rendered output.
- Only the first few pages are rendered.
To remove these limitations, apply a license or request a temporary license:
from groupdocs.viewer import License
License().set_license("path/to/license.lic")
Or set the environment variable (auto-applied at import):
export GROUPDOCS_LIC_PATH="path/to/license.lic"
Troubleshooting
| Issue | Platform | Fix |
|---|---|---|
Failed to detect file type for PSD, PSB, AI or ONE |
Linux/macOS | These formats are Windows-only — render them on Windows |
Cannot find fallback font 'Generic Sans Serif' rendering MPP/MPT/MPX |
Linux | Install the Microsoft core fonts: apt-get install ttf-mscorefonts-installer && fc-cache -f (Debian: enable contrib). Liberation fonts do not satisfy this lookup |
| Garbled text or missing fonts in rendered HTML/PDF | Linux | apt-get install ttf-mscorefonts-installer fontconfig && fc-cache -f |
DllNotFoundException: libgdiplus or The type initializer for 'Gdip' threw an exception |
Linux/macOS | Not expected: since 26.9 no libgdiplus is needed. Install it (apt-get install libgdiplus / brew install mono-libgdiplus) and report the document to support |
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors |
Linux | Do NOT set this variable. ICU must be available. |
is not a supported wheel on this platform, No matching distribution found for groupdocs-viewer-net, or pip installs a version older than 26.9 |
Linux/macOS | The OS is older than the wheel needs (glibc 2.27, macOS 12), or pip is older than 20.3: python -m pip install --upgrade pip. Versions up to 26.5 were tagged for older systems, so an unpinned install falls back to them — and they fail at first use there. On an Intel Mac, a Python built against an old SDK reports macOS 10.16 — use pip 24.1+ or SYSTEM_VERSION_COMPAT=0 pip install groupdocs-viewer-net |
System Requirements
- Python 3.5 - 3.14, pip 20.3 or newer
- Windows x64, Linux x64, macOS x64/ARM64 — 64-bit Python only; there is no 32-bit Windows wheel
- Linux: glibc 2.27 or newer (e.g. Ubuntu 18.04+, Debian 10+, RHEL 8+), plus fonts and ICU (
apt-get install libicu-dev fontconfig ttf-mscorefonts-installer; on Debian enablecontribfirst). Nolibgdiplus. - macOS 12 or newer, Intel or Apple Silicon.
More Resources
Also available for other platforms: .NET | Java | Node.js
Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License
Release files for groupdocs-viewer-net 26.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| groupdocs_viewer_net-26.9.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| groupdocs_viewer_net-26.9.0-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details |
| groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_x86_64.whl | Python 3 | none | macOS 12.0+ x86-64 | Details |
| groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details |
Total release size: 726.9 MB
Release files / groupdocs_viewer_net-26.9.0-py3-none-win_amd64.whl
| Download URL | groupdocs_viewer_net-26.9.0-py3-none-win_amd64.whl |
|---|---|
| Size | 170.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fad5c4da4644f99267df760ae51084cdc36c6ad1ff315163d9e80ed4c2e0112c
|
|
BLAKE2b-256 checksum How to use checksums |
a6f7237757ada584942a2e4aca09686bd239bc0efabd18cbb0a8b89d710ceef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_viewer_net-26.9.0-py3-none-manylinux_2_27_x86_64.whl
| Download URL | groupdocs_viewer_net-26.9.0-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 185.1 MB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
75337a139acdfb1938d9e2575704e9dd1c5687abe746ebc648b47aa710e7d465
|
|
BLAKE2b-256 checksum How to use checksums |
8bea316b933b31b36464d1ac5405087d67d0b8e37fc623473588c81bbac5351c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_x86_64.whl
| Download URL | groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 186.9 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d978a8d53638a1657439b2e4b30d3e388ebc5a7007f9b2e538f83e8ba68d83d
|
|
BLAKE2b-256 checksum How to use checksums |
438d5fad62bbccf8cbc38c42dc0bf21363cc66abb1bd0c8b5e9ceb247b62c1b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_arm64.whl
| Download URL | groupdocs_viewer_net-26.9.0-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 184.4 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9ce66eb47ff3d1a1ff77ca4ffb4d7c7eba5ae99440063702a8ea36f60a78237f
|
|
BLAKE2b-256 checksum How to use checksums |
4eef53491b83603188c05a5b1a7f3e4328b08dffe4c4d4e17cfad890b0021aef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|