GroupDocs.Viewer
26.8.0
Prefix Reserved
dotnet add package GroupDocs.Viewer --version 26.8.0
NuGet\Install-Package GroupDocs.Viewer -Version 26.8.0
<PackageReference Include="GroupDocs.Viewer" Version="26.8.0" />
<PackageVersion Include="GroupDocs.Viewer" Version="26.8.0" />
<PackageReference Include="GroupDocs.Viewer" />
paket add GroupDocs.Viewer --version 26.8.0
#r "nuget: GroupDocs.Viewer, 26.8.0"
#:package GroupDocs.Viewer@26.8.0
#addin nuget:?package=GroupDocs.Viewer&version=26.8.0
#tool nuget:?package=GroupDocs.Viewer&version=26.8.0
Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License
GroupDocs.Viewer for .NET is a document rendering API that displays 190+ file formats as HTML, PDF, PNG, and JPEG — without installing Microsoft Office, OpenOffice, or any other third-party software. Use it to build document viewers for web, desktop, and mobile applications in C#, F#, or VB.NET.
Get Started
dotnet add package GroupDocs.Viewer
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("resume.docx"))
{
// One HTML file per page; {0} is replaced with the page number.
var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
viewer.View(viewOptions);
}
How It Works
GroupDocs.Viewer is a metapackage. Restoring it brings in the runtime package that matches your
target framework, so you reference one package name whatever you build for:
| Your target framework | Runtime package restored | Runs on |
|---|---|---|
net462 and later |
GroupDocs.Viewer.Net462 |
Windows |
net6.0 and later |
GroupDocs.Viewer.Net60 |
Windows x64/x86, Linux x64/ARM64, macOS x64/ARM64 |
net6.0-windows and later |
GroupDocs.Viewer.Net60.Windows |
Windows, including ARM64 |
Rendering is self-contained: the engine is bundled in the package, so no office suite, printer driver, or other external software has to be installed on the machine.
Features
- Render to HTML, PDF, PNG, and JPEG through a single unified API.
- HTML with embedded or external resources — one self-contained file per page, or markup plus separate CSS, fonts, and images.
- Page control: render a single page, a range, or reorder and rotate pages.
- Document information: page count, file format, and page dimensions before rendering.
- Password-protected documents: open and render encrypted files.
- Flexible input: load from a file path or a stream.
- Text watermarks on rendered output.
- Font handling: supply custom font directories and control substitution.
- Output tuning: image quality, resource minification, and text-as-image options.
- ASP.NET Core UI via the GroupDocs.Viewer.UI package.
See the Features overview for details.
Common Tasks
- Display documents in a browser with no Office install and no browser plugin
- Convert an uploaded file to PDF for download or archiving
- Generate page thumbnails and previews for a document library
- Read page count and format before deciding how to process a file
- Watermark previews for preview-only or DRM-style workflows
- Render only the page a user is viewing, for fast paging through large documents
- Render password-protected documents supplied by users
Supported File Formats
This API renders a broad set of document, image, and data formats, including:
- Word Processing: DOC, DOCX, DOCM, DOT, ODT, RTF, TXT
- Spreadsheets: XLS, XLSX, XLSM, XLSB, ODS, CSV, TSV, Numbers
- Presentations: PPT, PPTX, PPS, PPSX, ODP
- PDF & Fixed Layout: PDF, XPS, OXPS
- Images & Graphics: JPG, PNG, BMP, GIF, TIFF, WEBP, SVG, PSD, AI, CDR
- Metafiles: EMF, WMF
- CAD & 3D: DWG, DXF, DGN, IFC, STL
- Medical Imaging: DICOM
- Email & Outlook: MSG, EML, EMLX, PST, OST, VCF
- Visio Diagrams: VSD, VSDX, VSS, VSX
- Project: MPP, MPT, MPX
- OneNote: ONE
- Web & Markup: HTML, MHTML, XML, JSON
- eBooks: EPUB, MOBI, FB2, CHM, AZW3
- Archives: ZIP, RAR, 7Z, TAR, GZ, BZ2
- Source Code: C#, Java, JavaScript, PHP, Python, SQL, and more
Supports 190+ file formats.
For a complete list, see supported formats.
Examples
Render to HTML
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("resume.docx"))
{
// Embedded resources produce one self-contained HTML file per page.
var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
viewer.View(viewOptions);
}
Render to PDF
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("solution.pptx"))
{
var viewOptions = new PdfViewOptions("solution.pdf");
viewer.View(viewOptions);
}
Render to PNG or JPEG
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("flyer.docx"))
{
var viewOptions = new PngViewOptions("page_{0}.png");
viewer.View(viewOptions);
}
Render specific pages
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("report.docx"))
{
var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
// Render pages 1 and 3 only.
viewer.View(viewOptions, 1, 3);
}
Get document information
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("invoice.xlsx"))
{
var info = viewer.GetViewInfo(ViewInfoOptions.ForHtmlView());
Console.WriteLine("Format: " + info.FileType);
Console.WriteLine("Pages: " + info.Pages.Count);
}
Load a password-protected document
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
var loadOptions = new LoadOptions { Password = "123456" };
using (var viewer = new Viewer("encrypted.docx", loadOptions))
{
var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
viewer.View(viewOptions);
}
Add a text watermark
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using (var viewer = new Viewer("contract.pdf"))
{
var viewOptions = new PngViewOptions("page_{0}.png");
viewOptions.Watermark = new Watermark("CONFIDENTIAL");
viewer.View(viewOptions);
}
Cache rendering results
Caching makes repeat views of the same document return almost immediately — worth enabling in any web application that renders the same files more than once.
using GroupDocs.Viewer;
using GroupDocs.Viewer.Caching;
using GroupDocs.Viewer.Options;
var cache = new FileCache("cache");
var settings = new ViewerSettings(cache);
using (var viewer = new Viewer("sample.docx", settings))
{
var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
viewer.View(viewOptions);
}
AI Agent & LLM Friendly
- 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 as plain text for RAG and LLM context:
- Single file:
https://docs.groupdocs.com/viewer/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 these limitations:
- Only the first 2 pages of a document are rendered.
- A trial watermark is added to the top of each rendered page.
To remove these limitations, apply a license or request a temporary license:
using GroupDocs.Viewer;
var license = new License();
license.SetLicense("GroupDocs.Viewer.lic");
Troubleshooting
| Issue | Platform | Fix |
|---|---|---|
| Missing or substituted fonts in rendered output | Linux / Docker | Install fonts and refresh the cache: apt-get install fontconfig ttf-mscorefonts-installer && fc-cache -f |
FileNotFoundException for a dependency at run time |
.NET Framework | Binding redirects are required. NuGet applies them automatically; ZIP and MSI users add them by hand — the redirects are listed in the readme.txt shipped with those packages. |
| Rendering on Windows ARM64 | Windows ARM64 | Target net6.0-windows so the GroupDocs.Viewer.Net60.Windows runtime is restored. |
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors |
Linux | Do not set this variable; ICU must be available. |
System Requirements
- .NET Framework 4.6.2 or later, or .NET 6.0 or later
- Windows (x64/x86/ARM64), Linux (x64/ARM64), macOS (x64/ARM64)
- No Microsoft Office, OpenOffice, or other office suite required
See System requirements for details.
Support
Technical support is available to all users, including those evaluating the product, through the Free Support Forum and the Paid Support Helpdesk.
More Resources
Also available for other platforms: Java | Node.js | Python
Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- GroupDocs.Viewer.Net462 (= 26.8.0)
-
net6.0
- GroupDocs.Viewer.Net60 (= 26.8.0)
-
net6.0-windows7.0
- GroupDocs.Viewer.Net60.Windows (= 26.8.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GroupDocs.Viewer:
| Package | Downloads |
|---|---|
|
GroupDocs.Viewer.UI.SelfHost.Api
GroupDocs.Viewer.UI.SelfHost.Api containing API implementation that is based on GroupDocs.Viewer for .NET see https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET-UI for more details. |
|
|
KAT.Core
KAT (Konnect Application Technology) is a unified low-code enterprise application platform by MMM Solutions — form builder, entity designer, workflow engine, LOB integrations, dashboards, scheduled processes, document OCR, PDF processing, e-signature, redaction and annotation, AI slot booking, scheduling and meetings, and enterprise authentication (OAuth 2.0/OIDC, Entra ID, Entra External ID, B2C, OKTA, Government eKYC). One Platform. Every Process. Zero Friction. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.8.0 | 0 | 8/31/2026 |
| 26.4.0 | 2,691 | 4/22/2026 |
| 25.12.0 | 3,854 | 12/30/2025 |
| 25.11.0 | 930 | 12/9/2025 |
| 25.9.0 | 3,919 | 9/28/2025 |
| 25.8.0 | 1,378 | 8/29/2025 |
| 25.7.0 | 1,155 | 7/29/2025 |
| 25.6.0 | 869 | 6/28/2025 |
| 25.5.0 | 1,227 | 5/28/2025 |
| 25.4.0 | 1,964 | 4/29/2025 |
| 25.3.0 | 4,297 | 3/27/2025 |
| 25.2.0 | 6,298 | 2/27/2025 |
| 25.1.1 | 7,908 | 2/3/2025 |
| 25.1.0 | 2,352 | 1/30/2025 |
| 24.12.0 | 483,485 | 12/19/2024 |
| 24.11.0 | 12,358 | 11/28/2024 |
| 24.10.0 | 12,391 | 11/1/2024 |
| 24.9.0 | 29,679 | 9/27/2024 |
| 24.8.0 | 78,906 | 8/30/2024 |
| 24.7.0 | 29,905 | 8/2/2024 |
