TXTextControl.Web.DocumentViewer 34.5.1

Prefix Reserved
dotnet add package TXTextControl.Web.DocumentViewer --version 34.5.1
                    
NuGet\Install-Package TXTextControl.Web.DocumentViewer -Version 34.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TXTextControl.Web.DocumentViewer" Version="34.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TXTextControl.Web.DocumentViewer" Version="34.5.1" />
                    
Directory.Packages.props
<PackageReference Include="TXTextControl.Web.DocumentViewer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TXTextControl.Web.DocumentViewer --version 34.5.1
                    
#r "nuget: TXTextControl.Web.DocumentViewer, 34.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TXTextControl.Web.DocumentViewer@34.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TXTextControl.Web.DocumentViewer&version=34.5.1
                    
Install as a Cake Addin
#tool nuget:?package=TXTextControl.Web.DocumentViewer&version=34.5.1
                    
Install as a Cake Tool

TXTextControl® Document Viewer Component

View, sign and annotate documents in your web applications

Add document viewing, sharing and collaboration to your applications. Integrate electronic signatures into your on-prem applications and sign all types of supported documents.

📦 Dependencies

This package requires the following assemblies, which are not included in this NuGet package:

  • TXDocumentServer.Core.dll
  • TXTextControl.Core.dll
  • TXTextControl.Server.Core.dll
  • TXBarcode.dll
  • TXDrawing.dll

Browser compatibility

The Document Viewer supports Safari and Firefox on iPadOS 16.7.16 and newer.

🚀 Getting Started

Hosting the Document Viewer

  • ASP.NET Core - Setup and configure the backend.
// File: Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
builder.Services.AddTXDocumentViewer();

var app = builder.Build();
app.UseRouting();
app.UseTXDocumentViewer();
app.Run();
  • ASP.NET MVC - The backend for the Document Viewer is already setup and ready to use.

The HTML Helper loads the embedded, version-matched viewer assets automatically; no separate static-file setup is required. The legacy TXDocumentViewer browser object remains available for compatibility, while new integrations should use the rendered <tx-document-viewer> element.

Fonts

The MVC package does not discover or serve font files. Install fonts needed for document processing in the host server environment and make browser fonts available to the client as needed. The viewer uses the fonts provided by those environments.

Process isolation and worker pool

The Supervisor is the long-lived process manager for document processing. It starts and monitors the Worker processes, assigns operations to available workers, enforces operation deadlines and replaces workers that fail.

A Worker performs the actual native TX Text Control document operation. Each worker handles one active operation at a time. Additional operations wait for an available Worker. Waiting does not consume the worker operation deadline; cancellation before assignment removes a waiting job without invoking a Worker.

ASP.NET Core uses in-process processing by default. To isolate native operations, explicitly select IsolatedProcess:

services.AddTXDocumentViewer(options =>
{
    options.Process.Mode = DocumentProcessingMode.IsolatedProcess;
});

In isolated mode the host starts one Supervisor and, by default, Environment.ProcessorCount Workers before accepting requests. The supervisor remains alive across requests and replaces failed workers. To choose a different pool size:

services.AddTXDocumentViewer(options =>
{
    options.Process.Mode = DocumentProcessingMode.IsolatedProcess;
    options.Process.WorkerPool.Count = 4;
});

Waiting jobs have no configured count limit and can retain many requests in memory under heavy load. All configured Workers start with the host, so machines with many available processors also use more memory and startup time. A Supervisor or Worker startup failure prevents an isolated host from starting.

In-process mode uses the same processing engine as Classic and serializes native operations in the application process. It has no worker queue, hard operation timeouts or worker replacement. A native crash or hang can affect the web application process.

Handling document-processing errors

Register application IExceptionHandler implementations before AddTXDocumentViewer, then enable ASP.NET Core exception handling before the viewer routes. Application handlers receive a public DocumentProcessingException with its safe message, failure category and job identifier. A handler can log or react to the category and return false to let the viewer produce its generic HTTP response. If it returns true, it must write the complete safe HTTP response itself.

builder.Services.AddExceptionHandler<MyDocumentProcessingHandler>();
builder.Services.AddProblemDetails();
builder.Services.AddTXDocumentViewer();

var app = builder.Build();
app.UseExceptionHandler();
app.UseRouting();
app.UseTXDocumentViewer();

The viewer fallback preserves the existing status codes and JSON fields (error, kind, and message) without including TX Text Control exception details, worker stack traces or server file paths. Other exceptions continue to the application's configured ASP.NET Core fallback.

When isolated processing is selected, AddTXDocumentViewer() validates worker counts, size limits, timeouts, and Supervisor and Worker DLL paths at host startup. Invalid values stop the host before any process starts. Runtime launch and native processing errors remain categorized job failures.

Each worker handles one active operation, so four workers provide up to four parallel operations. The supervisor is shared by the configured worker pool, remains alive across requests and replaces a failed worker.

Platform support and hosting model

The ASP.NET Core package targets net8.0. When isolated processing is selected, it uses a Supervisor and Worker processes to separate native document processing from the web application. The managed process boundary supports Windows, Linux and macOS .NET 8 environments; the installed TX Text Control runtime and its native dependencies determine the final platform support.

On Windows, the Supervisor and Worker are additionally tied to the lifetime of the web application. If the web application terminates unexpectedly, Windows cleans up the associated document-processing processes as well. On non-Windows systems, and whenever this operating-system cleanup mechanism is unavailable, the portable process-lifetime and named-pipe mechanisms are used as a fallback.

Signing workflows

The default signing workflow remains available. RedirectUrlAfterSignature and CustomSigning are deprecated compatibility options and should not be used for new integrations.

To process the signed document on the server, register an ISignatureCompletionService. Its CompleteAsync method receives SignatureData, including SignedDocument, and returns the document sent in the signing JSON response. Native signing produces Base64-encoded TX Internal Unicode Format data, regardless of the loaded file's format. The viewer does not automatically load or download the returned document; applications can handle the response with viewer.signatures.setSubmitCallback(). Native signing remains built into the controller. The automatic redirect workflow will be removed in a future major version.

Using the Document Viewer

Use the HTML Helper for initializing and rendering the Document Viewer.

@Html.TXTextControl().DocumentViewer(settings =>
 {
     settings.DocumentPath = Server.MapPath("~/App_Data/Documents/nda.tx");
     settings.Dock = DocumentViewerSettings.DockStyle.Fill;
     settings.IsSelectionActivated = true;
     settings.ShowThumbnailPane = true;
 }).Render()

Additional supported platforms:

❓ Help Resources

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
34.5.1 0 11/27/2026
34.2.0 16,482 2/24/2026
34.1.0 10,433 12/3/2025
34.0.0 515 11/10/2025
33.3.1 3,288 9/1/2025
33.3.0 2,908 8/18/2025
33.2.1 307 7/30/2025
33.2.0 2,300 6/26/2025
33.1.0 3,221 5/7/2025
33.0.0 1,987 3/13/2025
32.5.0 522 5/7/2025
32.4.0 7,893 9/9/2024
32.3.1 623 8/8/2024
32.3.0 5,548 4/29/2024
32.2.1 895 3/13/2024
32.2.0 7,126 1/26/2024
32.1.1 712 12/21/2023
32.1.0 1,155 11/22/2023
32.0.2 522 10/19/2023
32.0.1 1,145 9/13/2023
Loading failed