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/x86, 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 |
|---|---|---|
| Project Management (MPP, MPT, MPX) | Yes | No |
| All other formats (Office, PDF, Visio, CAD, images, email, archives, eBooks, web, …) | Yes | Yes |
The Linux/macOS build uses GroupDocs.Viewer.CrossPlatform, which renders every format except the Project Management family (MPP, MPT, MPX) — render those on Windows. Everything else, including Visio, works on all platforms.
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 |
|---|---|---|
System.Drawing.Common is not supported |
Linux/macOS | apt-get install libgdiplus (Linux) or brew install mono-libgdiplus (macOS) |
| Garbled text or missing fonts in rendered HTML/PDF | Linux | apt-get install ttf-mscorefonts-installer fontconfig && fc-cache -f |
The type initializer for 'Gdip' threw an exception |
macOS | brew install mono-libgdiplus |
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors |
Linux | Do NOT set this variable. ICU must be available. |
System Requirements
- Python 3.5 - 3.14
- Windows x64/x86, Linux x64, macOS x64/ARM64
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.5.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.5.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| groupdocs_viewer_net-26.5.0-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| groupdocs_viewer_net-26.5.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| groupdocs_viewer_net-26.5.0-py3-none-macosx_10_14_x86_64.whl | Python 3 | none | macOS 10.14+ x86-64 | Details |
Total release size: 705.7 MB
Release files / groupdocs_viewer_net-26.5.0-py3-none-win_amd64.whl
| Download URL | groupdocs_viewer_net-26.5.0-py3-none-win_amd64.whl |
|---|---|
| Size | 170.8 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5522edcba3f683a10bba1d87d9c99a05a342b224a4060559077196eef7e44057
|
|
BLAKE2b-256 checksum How to use checksums |
d7a944f9d9c7381b7076e7b664f007800b292ea4621eb42bfaa9df63c6fafbfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / groupdocs_viewer_net-26.5.0-py3-none-manylinux1_x86_64.whl
| Download URL | groupdocs_viewer_net-26.5.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 177.6 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
964285ea577b717787ea3a58bcae0de3cfca0cfedc4a40c98eb7ed297310d9d2
|
|
BLAKE2b-256 checksum How to use checksums |
052a541fa8125ee61caec6207c44e64ac9e9b567aba6aa62a8111fb4876b9f50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / groupdocs_viewer_net-26.5.0-py3-none-macosx_11_0_arm64.whl
| Download URL | groupdocs_viewer_net-26.5.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 177.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5a3e96ca0948a346504096397830fbb42bd341b14cfc059dc673d05ddb77be63
|
|
BLAKE2b-256 checksum How to use checksums |
081f683eff599de288e56328ed4f6a3aca22326824720690d3089a606e1d42dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / groupdocs_viewer_net-26.5.0-py3-none-macosx_10_14_x86_64.whl
| Download URL | groupdocs_viewer_net-26.5.0-py3-none-macosx_10_14_x86_64.whl |
|---|---|
| Size | 179.9 MB |
| Tags | Python 3 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
abedd90141d3557f5020eacd988cb999a624d5871b80eeb162984deddf9e7744
|
|
BLAKE2b-256 checksum How to use checksums |
0e3274ed824d4804f163dd207f3935f7f0cc08514d7c653004c4fc044a59fb4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|