SVG Export Announced for TX Text Control 32.0
SVG will play a central role in future versions of TX Text Control, and one feature is the direct export of SVG images from document pages. This article provides an overview of this new feature.

Scalable Vector Graphics (SVG) is an XML-based vector image format that is developed and maintained by the World Wide Web Consortium (W3C). This format will play a central role in future versions of TX Text Control.
SVG Image Import
In version 30.0, we introduced support for adding SVG images to documents in TX Text Control. This allowed you to add vector graphics to a document and also export them to PDF documents while maintaining scalable images.
Exporting SVG Images
In an upcoming version of TX Text Control (32.0) we will introduce the export of document pages as SVG images. The Get
string svgSources = tx.GetPages()[1].GetImage(TXTextControl.Page.PageContent.All, 300);
As with the other implementations, the Page
The second parameter specifies the resolution of the embedded bitmap images. Since SVG is a vector graphic, pixel-based images are embedded. Depending on the application, the required resolution can be defined.
Rendering Pages as SVGs
The following ASP.NET Core controller code loads a document into TX Text Control and exports and returns the first page as an SVG image.
public IActionResult Index() {
ViewModel model = new ViewModel();
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) {
tx.Create();
tx.Load("App_Data/lease_agreement.tx", TXTextControl.StreamType.InternalUnicodeFormat);
string svgSources = tx.GetPages()[1].GetImage(TXTextControl.Page.PageContent.All, 300);
model.svgImage = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(svgSources));
}
return View(model);
}
In the view, the returned SVG image is rendered in an <img> HTML tag.
@model tx_svg.Models.ViewModel
<img style="width: 600px; border: 1px solid #c2c2c2;" src="data:image/svg+xml;base64,@Model.svgImage" />
The SVG representation is rendered in the browser:

Zooming
When you zoom into the page, the advantage of SVG is immediately apparent. Vector graphics do not blur when scaled:

Document Viewer and Editor
The Document Editor and Document Viewer use this new technology to render documents, adding significant value to these components. For the Document Viewer, all pages need to be rendered only once for each zoom factor, saving processing power and increasing overall performance.
Stay tuned for more!
ASP.NET
Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.
- Angular
- Blazor
- React
- JavaScript
- ASP.NET MVC, ASP.NET Core, and WebForms
Related Posts
TX Text Control 30.0 Preview: Inserting SVG Images
We are currently working on the anniversary release 30.0 of TX Text Control that is planned to be released in Q4 of 2021. In a series of blog posts, we will preview some of the new features for…
PDF/UA vs. PDF/A-3a: Which Format Should You Use for Your Business Application?
In this blog post, we will explore the differences between PDF/UA and PDF/A-3a, helping you choose the right format for your business needs. We will discuss the key features, benefits, and use…
Validating PDF/UA Documents in .NET C#
Creating accessible and compliant PDF documents is becoming an increasingly important requirement across industries. In this blog post, we explore how to validate PDF/UA documents using Text…
Sneak Peek: TX Text Control 34.0 Coming November 2025
We are excited to announce the upcoming release of TX Text Control 34.0, scheduled for November 2025. This update brings a host of new features and improvements to enhance your document processing…
TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
