# Document Viewer: Setting the Rendering Mode

> This article shows how to set the rendering mode of the Document Viewer. The rendering mode determines how the document is rendered and displayed in the viewer using Bitmap or SVG rendering.

- **Author:** Bjoern Meyer
- **Published:** 2024-08-22
- **Modified:** 2026-07-17
- **Description:** This article shows how to set the rendering mode of the Document Viewer. The rendering mode determines how the document is rendered and displayed in the viewer using Bitmap or SVG rendering.
- **5 min read** (885 words)
- **Tags:**
  - ASP.NET
  - ASP.NET Core
  - Document Viewer
- **Web URL:** https://www.textcontrol.com/blog/2024/08/22/document-viewer-setting-the-rendering-mode/
- **LLMs URL:** https://www.textcontrol.com/blog/2024/08/22/document-viewer-setting-the-rendering-mode/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2024/08/22/document-viewer-setting-the-rendering-mode/llms-full.txt

---

The TX Text Control Document Viewer can be used to view a variety of industry-standard document types, including Office Open XML DOCX, DOC, RTF, and PDF. All documents can be viewed in browser applications with the same look and feel, and can be used to fill out forms or review documents with track changes, comments, and annotations.

The following screenshot shows a typical scenario of a form that is made available for an end user to fill out and submit.

![Filling out forms in TX Text Control Document Viewer](https://s1-www.textcontrol.com/assets/dist/blog/2024/08/22/a/assets/viewer1.webp "Filling out forms in TX Text Control Document Viewer")

As of version [32.3.1](https://www.nuget.org/packages/TXTextControl.Web.DocumentViewer/32.3.1), the render mode can be specified when adding an instance to a view. The render mode defines how the document is rendered in the viewer. The following render modes are available:

- **Auto**: The viewer automatically selects the best mode based on the browser capabilities.
- **Bitmap**: The document is rendered as a bitmap image.
- **GlyphOutlines**: The document is rendered as SVG vector graphics.
- **Font**: The document is rendered using the actual fonts.

The following code snippet shows how to add the viewer to a view with a specific render mode, in this case *GlyphOutlines*:

```
@Html.TXTextControl().DocumentViewer(settings => {
  settings.DocumentPath = ("App_Data/Documents/invoice.docx");
  settings.RenderMode = ComponentRenderMode.GlyphOutlines;
}).Render()
```

### Bitmap vs. SVG

Now the document is loaded and pages are rendered as vector graphics, with all fonts rendered to glyphs, eliminating the need for client-side fonts to render a consistent document across browsers and devices. This mode is very useful when using a higher resolution (4k+), as SVGs are rendered quickly and efficiently by modern browsers, but small elements are difficult to read when downscaled.

At lower resolutions, such as Full HD, the bitmap rendering mode is recommended because smaller text elements render more smoothly and are easier to read on lower resolution screens. The disadvantage of the bitmap rendering mode is that the document is rendered as an image, which can be slower to render and can be less sharp when zooming in.

When using the *Font* mode, the actual fonts are used to render the document. The disadvantage of this mode is that the fonts must be available on the client-side, which can be a problem when using custom fonts or when the document contains fonts that are not available on the client-side.

When using the *Auto* mode, the viewer automatically selects the best mode based on the browser capabilities. This is the default mode and is recommended for most scenarios.

### Size Considerations

When using the *GlyphOutlines* mode, the document is rendered as SVG vector graphics. This mode is very efficient in terms of file size because the document is rendered as vector graphics. The returned bitmap images are compressed and optimized, but the file size is larger compared to the SVG vector graphics. When using the *Font* mode, the file size is the smallest because it contains only the actual text information and positions.

The following screenshot from Chrome Developer Tools shows the return page size of a sample document when rendered in *Bitmap* mode:

![Chrome Developer Tools showing the return page size of a sample document when rendered in Bitmap mode](https://s1-www.textcontrol.com/assets/dist/blog/2024/08/22/a/assets/viewer2.webp "Chrome Developer Tools showing the return page size of a sample document when rendered in Bitmap mode")

The following screenshot shows the return page size of the same document when rendered in *GlyphOutlines* mode:

![Chrome Developer Tools showing the return page size of a sample document when rendered in GlyphOutlines mode](https://s1-www.textcontrol.com/assets/dist/blog/2024/08/22/a/assets/viewer3.webp "Chrome Developer Tools showing the return page size of a sample document when rendered in GlyphOutlines mode")

The next screenshot shows the return page size of the same document when rendered in *Font* mode:

![Chrome Developer Tools showing the return page size of a sample document when rendered in Font mode](https://s1-www.textcontrol.com/assets/dist/blog/2024/08/22/a/assets/viewer4.webp "Chrome Developer Tools showing the return page size of a sample document when rendered in Font mode")

This is clearly the smallest file size, as it contains only the actual text information and positions, including included images, which of course need to be embedded.

### Conclusion

The TX Text Control Document Viewer can be used to view a variety of industry-standard document types, including Office Open XML DOCX, DOC, RTF, and PDF. The viewer can be used to fill out forms or review documents with track changes, comments, and annotations. The render mode can be specified when adding an instance to a view. The render mode defines how the document is rendered in the viewer. The following render modes are available: *Auto*, *Bitmap*, *GlyphOutlines*, and *Font*.

When using the *GlyphOutlines* mode, the document is rendered as SVG vector graphics. This mode is very efficient in terms of file size because the document is rendered as vector graphics. The returned bitmap images are compressed and optimized, but the file size is larger compared to the SVG vector graphics. When using the *Font* mode, the file size is the smallest because it contains only the actual text information and positions.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [High-Performance Text Replacement in Large DOCX Files using C# .NET](https://www.textcontrol.com/blog/2025/07/30/high-performance-text-replacement-in-large-docx-files-using-csharp-dotnet/llms.txt)
- [Document Viewer 33.2.1 Released: New Event and Bug Fixes](https://www.textcontrol.com/blog/2025/07/30/document-viewer-33-2-1-released-new-event-and-bug-fixes/llms.txt)
- [Building an ASP.NET Core Backend (Linux and Windows) for the Document Editor and Viewer](https://www.textcontrol.com/blog/2025/03/26/building-an-asp-net-core-backend-for-the-document-editor-and-viewer/llms.txt)
- [TX Text Control Document Editor and Viewer for Blazor Released](https://www.textcontrol.com/blog/2025/03/25/tx-text-control-document-editor-and-viewer-for-blazor-released/llms.txt)
- [Getting Started: Document Viewer for Blazor in ASP.NET Core](https://www.textcontrol.com/blog/2025/03/25/getting-started-document-viewer-for-blazor-in-asp-net-core/llms.txt)
- [Announcing Our Work on a Blazor Component for Document Editing and Viewing](https://www.textcontrol.com/blog/2025/01/24/announcing-our-work-on-a-blazor-component-for-document-editing-and-viewing/llms.txt)
- [Preparing Documents for E-Signing for Multiple Signers in .NET C#](https://www.textcontrol.com/blog/2024/11/13/preparing-documents-for-e-signing-for-multiple-signers-in-net-c-sharp/llms.txt)
- [ASP.NET Core: Use the Document Editor and Viewer in the Same Razor View](https://www.textcontrol.com/blog/2024/11/08/asp-net-core-use-the-document-editor-and-viewer-in-the-same-razor-view/llms.txt)
- [Optimizing Digital Signature Workflows: Starting with MS Word DOCX Files Instead of PDFs in C#](https://www.textcontrol.com/blog/2024/09/27/optimizing-digital-signature-workflows-starting-with-ms-word-docx-files-instead-of-pdfs-in-csharp/llms.txt)
- [View MS Word DOCX and PDF Documents using a .NET C# Document Viewer for ASP.NET Core and ASP.NET](https://www.textcontrol.com/blog/2024/08/08/view-ms-word-docx-and-pdf-documents-using-a-net-csharp-document-viewer-for-aspnet-core-and-aspnet/llms.txt)
- [Getting Started Video Tutorial: How to Add Electronic and Digital Signatures to PDF Documents in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/08/05/getting-started-video-tutorial-how-to-add-electronic-and-digital-signatures-to-pdf-documents-in-asp-net-core-csharp/llms.txt)
- [Getting Started Video Tutorial: How to use the Document Viewer in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/08/05/getting-started-video-tutorial-how-to-use-the-document-viewer-in-asp-net-core-csharp/llms.txt)
- [Transforming Financial Documents into Smart and Secure Forms in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/05/01/transforming-financial-documents-into-smart-and-secure-forms-in-asp-net-core-c-sharp/llms.txt)
- [Document Viewer: Long Polling Support for Loading Documents](https://www.textcontrol.com/blog/2024/04/25/document-viewer-long-polling-support-for-loading-documents/llms.txt)
- [Adding and Sharing Annotations across Document Types using the Document Viewer in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/04/19/adding-and-sharing-annotations-across-document-types-using-the-document-viewer-in-asp-net-core-c-sharp/llms.txt)
- [Adding a Security Middleware to ASP.NET Core Web Applications to Protect TX Text Control Document Editor and Document Viewer Endpoints](https://www.textcontrol.com/blog/2024/03/18/adding-a-security-middleware-to-asp-net-core-web-applications-to-protect-tx-text-control-document-editor-and-document-viewer-endpoints/llms.txt)
- [Building an ASP.NET Core Backend Application to Host the Document Editor and Document Viewer](https://www.textcontrol.com/blog/2024/03/14/building-an-asp-net-core-backend-application-to-host-the-document-editor-and-document-viewer/llms.txt)
- [Signature Soft Pad Customization](https://www.textcontrol.com/blog/2023/11/20/signature-soft-pad-customization/llms.txt)
- [Securing the Signature Endpoint with Custom ActionFilterAttributes](https://www.textcontrol.com/blog/2023/07/25/securing-the-signature-endpoint-with-custom-actionfilterattributes/llms.txt)
- [Common Web API Methods for Handling E-Signature Workflows in ASP.NET Core C#](https://www.textcontrol.com/blog/2023/07/20/common-web-api-methods-for-handling-esignature-workflows-in-aspnet-core-csharp/llms.txt)
- [Use PDF.js to Render PDF Documents within the Document Viewer](https://www.textcontrol.com/blog/2023/03/18/use-pdfjs-to-render-pdf-documents-within-the-document-viewer/llms.txt)
- [Document Viewer 31.2.2 RC1 Released with New Features](https://www.textcontrol.com/blog/2023/03/17/document-viewer-3122-rc1-released-with-new-features/llms.txt)
- [Feature Announcement: Enabling External PDF Renderer PDF.js in TX Text Control DocumentViewer](https://www.textcontrol.com/blog/2023/01/20/documentviewer-enabling-external-pdf-renderer-pdfjs/llms.txt)
- [Document Viewer: SignatureSettings Explained](https://www.textcontrol.com/blog/2022/09/16/document-viewer-signaturesettings-explained/llms.txt)
- [Getting Started: Document Viewer with ASP.NET Core](https://www.textcontrol.com/blog/2022/09/01/getting-started-document-viewer-with-aspnet-core/llms.txt)
