Products Technologies Demo Docs Blog Support Company

Announcing TX Text Control DS Server 5.0

We are excited to announce the release of TX Text Control DS Server 5.0. This release focuses on extensibility, plugin integration, and developer productivity while continuing to improve the Document Editor and Document Viewer.

Announcing TX Text Control DS Server 5.0

We are excited to announce the release of TX Text Control DS Server 5.0. This release focuses on extensibility, plugin integration, and developer productivity while continuing to improve the HTML5 Document Editor and Document Viewer.

The highlight of this release is the introduction of new Dependency Injection services for plugins, enabling developers to access the document processing engine and active editor sessions directly from custom extensions. This makes it easier than ever to integrate DS Server into complex workflows and enterprise architectures.

New in DS Server 5.0

Built on TX Text Control 34.0

TX Text Control DS Server 5.0 is now built on the latest TX Text Control 34.0 document processing engine.

This update brings the newest improvements from the core TX Text Control platform to DS Server, including enhanced performance, improved document fidelity, and support for the latest document formats and features.

By aligning DS Server with TX Text Control 34.0, applications benefit from the same proven document technology used in the TX Text Control .NET components, ensuring consistent document layout, reliable document conversion, and high fidelity processing of DOCX, PDF, HTML, and RTF documents.

Dependency Injection Services for Plugins

DS Server now exposes internal functionality through two new services that can be injected into plugins using ASP.NET Core Dependency Injection.

Learn more

Check out the sample plugin on GitHub to see how to use the new dependency injection services.

https://github.com/TextControl/TXTextControl.DocumentServices.SamplePlugin

IDocumentProcessingService

Provides access to DS Server's document processing capabilities, including:

  • Document conversion
  • Mail merge processing
  • Document manipulation
  • PDF form field extraction
  • Barcode generation

IDocumentEditorSessionService

Provides access to active Document Editor sessions. Plugins can interact with live documents, modify formatting, access form fields, or implement custom logic tied to editor sessions.

Both services can be injected into plugin controllers, middleware, or services, enabling powerful customization of the DS Server platform.

Example: Accessing the Document Processing Engine

One of the most powerful additions in DS Server 5.0 is the IDocumentProcessingService. This service exposes the same document processing capabilities used internally by DS Server.

using Microsoft.AspNetCore.Mvc;
using TXTextControl.DocumentServices.DocumentProcessing.Abstractions;
using TXTextControl.DocumentServices.DocumentProcessing.Models;

[ApiController]
[Route("plugin/[controller]/[action]")]
public class DocumentProcessingController : ControllerBase {
    private readonly IDocumentProcessingService m_processing;

    public DocumentProcessingController(IDocumentProcessingService processing) {
        m_processing = processing;
    }

    [HttpPost]
    public async Task<IActionResult> Convert([FromBody] byte[] document, [FromQuery] string format = "PDF") {
        ReturnFormat returnFormat = Enum.Parse&lt;ReturnFormat&gt;(format, true);
        byte[] result = await m_processing.ConvertAsync(document, returnFormat, true);

        return returnFormat switch {
            ReturnFormat.PDF => File(result, "application/pdf", "converted.pdf"),
            ReturnFormat.HTML => File(result, "text/html", "converted.html"),
            ReturnFormat.DOCX => File(result, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "converted.docx"),
            ReturnFormat.RTF => File(result, "application/rtf", "converted.rtf"),
            _ => File(result, "application/octet-stream", "converted.dat"),
        };
    }

    [HttpPost]
    public async Task<IActionResult> MergeExample([FromBody] byte[] template) {
        MergeBody mergeBody = new() {
            Template = template,
            MergeData = new[] {
                new { Name = "Alice" },
                new { Name = "Bob" }
            }
        };

        byte[][] merged = await m_processing.MergeAsync(mergeBody, ReturnFormat.PDF, append: true);
        return File(merged[0], "application/pdf", "merged.pdf");
    }
}

This allows plugins to implement custom endpoints for document conversion, automation pipelines, or integration with external systems.

Common Operations

The IDocumentProcessingService provides methods for common document processing operations:

Operation Method Description
Merge MergeAsync Mail merge using JSON or object data
Convert ConvertAsync Convert between document formats
Find/Replace FindAndReplaceAsync Replace text
Append AppendAsync Combine multiple documents
Thumbnails GetThumbnailsAsync Generate image previews
Document Info GetDocumentInfoAsync Extract metadata and merge fields

Sub-APIs

In addition to the main document processing methods, the IDocumentProcessingService also provides access to several sub-APIs for specialized operations:

API Interface Description
PDF IPdfApi Create PDFs, extract metadata, embedded files
AcroForms IAcroFormsApi Read and analyze PDF form fields
Barcodes IBarcodesApi Generate and validate barcode images

Example: Working with Document Editor Sessions

Plugins can access active HTML5 Document Editor sessions through the IDocumentEditorSessionService. This allows custom APIs to load documents, manipulate formatting, or inspect fields inside a live editing session.

using Microsoft.AspNetCore.Mvc;
using TXTextControl.DocumentServices.DocumentEditor.Abstractions;
using TXTextControl.DocumentServices.DocumentEditor.Enums;
using TXTextControl.DocumentServices.DocumentEditor.Options;

[ApiController]
[Route("plugin/[controller]/[action]")]
public class DocumentEditorController : ControllerBase {
    private readonly IDocumentEditorSessionService m_sessions;

    public DocumentEditorController(IDocumentEditorSessionService sessions) {
        m_sessions = sessions;
    }

    [HttpPost]
    public async Task<IActionResult> LoadDocument(
        [FromQuery] string connectionId,
        [FromBody] string base64,
        [FromQuery] string format = "html") {

        IDocumentEditorSession session = m_sessions[connectionId];
        byte[] content = Convert.FromBase64String(base64);

        DocumentFormat documentFormat =
            Enum.Parse&lt;DocumentFormat&gt;(format, true);

        LoadOptions options =
            LoadOptions.FromDocumentFormat(documentFormat, content);

        await session.LoadAsync(options);

        return Ok(new { message = "Document loaded successfully." });
    }

    [HttpPost]
    public async Task<IActionResult> SetParagraphColor(
        [FromQuery] string connectionId,
        [FromQuery] string color = "#FFFF00") {

        IDocumentEditorSession session = m_sessions[connectionId];
        IParagraphFormat paragraph = session.Selection.ParagraphFormat;

        await paragraph.SetBackColorAsync(color);

        return Ok(new { message = $"Paragraph color set to {color}." });
    }

    [HttpGet]
    public async Task<IActionResult> GetFieldInfo(
        [FromQuery] string connectionId) {

        IDocumentEditorSession session = m_sessions[connectionId];

        IApplicationField appField =
            await session.ApplicationFields.GetItemAsync();

        if (appField == null)
            return NotFound();

        string name = await appField.GetNameAsync();
        string typeName = await appField.GetTypeNameAsync();
        string text = await appField.GetTextAsync();

        return Ok(new { name, typeName, text });
    }
}

Common Operations

The IDocumentEditorSessionService provides methods for common session operations:

Operation Description
LoadAsync / SaveAsync Load or save documents in a session
SetUserNamesAsync Manage user tracking info
FormFields.GetElementAsync() Access form fields and set values
Selection.SaveAsync() Retrieve selected content as HTML or RTF
ApplicationFields.GetItemAsync() Retrieve merge fields at the current input position

Learn more

Learn more about the plugin architecture and how to get started with plugin development in the DS Server documentation.

https://www.nuget.org/packages/TXTextControl.DocumentServices.Plugin.Abstractions#readme-body-tab

Document Editor Improvements

DS Server 5.0 also includes several improvements to the HTML5 Document Editor:

  • Descriptive text for frames, tables, hyperlinks and document links
  • Merge blocks inserted via the ribbon now create unformatted tables
  • Status bar now displays insert and overtype mode
  • Initial text for certain merge fields can be defined through the JavaScript API
  • Browser console message when the TCP backend server is not running
  • Measurement units in the ribbon are now localized

Document Viewer Improvements

The Document Viewer now supports improved security for signing workflows. When a custom signing endpoint is provided via a plugin, DS Server can now automatically include the current OAuth access token when redirecting to the signing endpoint. This allows plugin-based signing services to reuse DS Server's built-in access token validation.

Bug Fixes

This release also includes multiple bug fixes across the Document Editor and Viewer, including improvements in spell checking, drag and drop for RTF documents, table row height validation in the JavaScript API, and several fixes related to digital signatures and annotations.

Available Now

TX Text Control DS Server 5.0 is available now. Visit the DS Server website to download the latest version and start building powerful document processing workflows with modern .NET technologies.

Trial tokens, the trial download, the NuGet packages, and the full versions for licensed customers are now available.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ASP.NETASP.NET CoreDS Server

Introducing DS Server 4.0: Linux-Ready and Container-Friendly

We are excited to announce the release of DS Server 4.0, our latest major update that makes your document processing workflows more flexible and powerful. This release marks two significant…


JavaScriptServerASP.NET Core

DS Server Released: On-Premise Document Services

We are very excited to announce the release of our new product DS Server. Bring document processing, editing, sharing, collaboration and creation to any app on any platform.


ASP.NET CoreDS ServerPreview

Preview: Using DocumentEditor for DS Server in ASP.NET Core

This tutorial shows how to use the DocumentServices.DocumentEditor for DS Server in an ASP.NET Core MVC application.


AngularASP.NET CoreDS Server

New Product Announcement: DS Server

This week, we will start the beta program with selected users for a brand new product. DS Server is a document processing backend server that can be easily deployed to your infrastructure to…


ASP.NET CoreDS Server

DS Server: Enabling HTTPS for TX Text Control Document Services Using Kestrel

In this article, we will explore how to enable HTTPS for TX Text Control Document Services (DS Server) using Kestrel, the cross-platform web server for ASP.NET Core. We will cover the necessary…

Share on this blog post on: