GroupDocs.Viewer for Python via .NET Overview
Leave feedback
On this page
What is GroupDocs.Viewer?
GroupDocs.Viewer for Python via .NET is a native Python library that renders 170+ file formats — DOCX, PDF, XLSX, PPTX, CAD drawings, email messages, compressed archives, eBooks, and raster images — into HTML, PDF, PNG, or JPG output. It runs entirely on-premise, requires no Microsoft Office installation, and ships as a pre-built wheel on Windows, Linux, and macOS.
Typical uses include:
In-app document preview — embed HTML rendering into desktop or web applications so users can read any document format without leaving the app.
Server-side rendering pipelines — convert user uploads to PDF for archival or to per-page PNG for thumbnail generation.
AI / RAG preprocessing — render DOCX, XLSX, EML, and scanned PDFs into page-level PNG images or structured HTML that LLMs can consume. See Agents and LLM Integration.
Redaction and watermarking — apply text watermarks during rendering, or produce password-protected PDFs from unprotected sources.
Accessibility and search — generate semantic HTML from PDFs, DWGs, and legacy office formats for indexing and screen readers.
Key Capabilities
Capability
Description
170+ file formats
DOCX, PDF, XLSX, PPTX, CAD, email, archives, eBooks, HTML, images, and more. See supported formats.
Four output targets
HTML (embedded or external resources), PDF, PNG, and JPG. Every source format renders to every target.
Load input from file-like objects — handy for cloud blobs and HTTP bodies.
Logging and diagnostics
Wire ConsoleLogger through ViewerSettings for production traces.
On-premise
No cloud calls, no Microsoft Office install, no network traffic.
Quick Example
fromgroupdocs.viewerimportViewerfromgroupdocs.viewer.optionsimportHtmlViewOptionsdefquick_example():"""Render a DOCX document to HTML — the hello-world example."""withViewer("./sample.docx")asviewer:options=HtmlViewOptions.for_embedded_resources("page_{0}.html")viewer.view(options)if__name__=="__main__":quick_example()
fromgroupdocs.viewerimportViewerfromgroupdocs.viewer.optionsimportLoadOptions,PdfViewOptions,Watermarkdefrender_with_options():"""Open a password-protected DOCX, render to PDF with a watermark."""load_options=LoadOptions()load_options.password="secret"withViewer("./protected.docx",load_options)asviewer:options=PdfViewOptions("./protected.pdf")options.watermark=Watermark("CONFIDENTIAL")viewer.view(options)if__name__=="__main__":render_with_options()
Install the package — Installation walks through PyPI and offline wheel installation for Windows, Linux, and macOS.
Run your first rendering — Quick Start Guide renders a DOCX to HTML, PDF, and PNG in five minutes.
Explore the examples — Running Examples clones the runnable repository and runs every documented scenario locally or in Docker.
Use it in depth — the Developer Guide covers loading, rendering, inspecting, page selection, watermarks, and attachments.
Render per format — the Rendering Basics section has per-format guides for PDF, Word, Excel, presentations, CAD, email, and more.
Plug it into AI pipelines — Agents and LLM Integration explains the MCP server, AGENTS.md, and how to chain GroupDocs.Viewer with GroupDocs.Conversion for exotic inputs.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.