IRONSOFTWAREHOME
MIGRATION GUIDES

How to Migrate from TextControl to IronPDF in C#

Curtis Chau
Curtis Chau
Updated: August 1, 2026

TX Text Control has established itself as a comprehensive document editor component in the .NET ecosystem, offering robust DOCX editing capabilities with embedded UI controls. However, for development teams whose primary requirement is PDF generation rather than full document editing, TextControl's architecture presents significant overhead in licensing costs, complexity, and runtime dependencies.

This guide provides a complete migration path from TextControl to IronPDF, with step-by-step instructions, code comparisons, and practical examples for professional .NET developers evaluating this transition.

Why Migrate from TextControl

The decision to migrate from TextControl typically centers on matching your tooling to your actual requirements. TX Text Control is fundamentally a document editor that treats PDF generation as a secondary feature. Key reasons development teams consider migration include:

Expensive Licensing: A single TX Text Control .NET Server developer license is $4,198 perpetual with one year of updates/support; a four-developer team license is $8,398 perpetual + 1yr (per textcontrol.com pricing). Annual subscription renewals run ~40% of list price (about $1,698/yr/developer), and the renewal window closes 30 days after expiration. Production deployment also requires separate server runtime licenses.

PDF as Secondary Path: Core architecture is a word-processing engine (DOCX/RTF first), with PDF as an export route rather than the primary surface.

Bundled Editor Surface: TX Text Control ships with DOCX editing UI components that may be unnecessary when the requirement is purely server-side PDF generation.

Word-Processor Architecture: HTML import flows through a word-processing pipeline rather than a Chromium-based renderer, so HTML5/CSS3 fidelity is typically weaker than a browser-engine PDF library.

STA-Affinity in ASP.NET: ServerTextControl traces back to a STA COM-style component model and is most reliable on STA-compatible threads, which complicates async/MTA hosting in modern ASP.NET Core stacks.

Complex API: ServerTextControl context management plus separate StringStreamType / BinaryStreamType / StreamType enums and a selection-driven document model add overhead for straightforward PDF generation tasks.

Cost Comparison

AspectTX Text Control .NET ServerIronPDF
Single developer$4,198 perpetual + 1yr supportOne-time per-developer license
Team of 4$8,398 perpetual + 1yr supportLower per-seat
Annual Renewal40% of list ($1,698/dev/yr)Optional support
Server runtimeSeparate runtime license required for productionNot required
UI ComponentsBundled DOCX editor surfacePDF-focused

IronPDF vs TextControl: Feature Comparison

Understanding the architectural differences helps technical decision-makers evaluate the migration investment:

FeatureTX Text ControlIronPDF
Primary FocusDOCX / word-processingPDF generation
License Cost (single dev)$4,198 perpetual + 1yr; ~40%/yr renewalOne-time per-developer license
PDF GenerationExport path on a word-processing engineCore functionality
Server runtime licenseRequired for productionNot required
ThreadingSTA-affinity in ASP.NETNo STA requirement
HTML/CSS RenderingHTML import via word-processing pipelineChromium HTML5/CSS3
HTML to PDFYes (secondary)Yes (primary)
CSS SupportLimitedFull CSS3
JavaScriptLimitedFull ES2024
URL to PDFComplex setupNative
Headers/FootersComplex APISimple HTML
Mail MergeProprietaryHTML templates
PDF/AYesYes
Password ProtectionYesYes
Digital SignaturesYesYes
Merge PDFsLimitedYes
Split PDFsLimitedYes
Context ManagementRequiredNot needed
Cross-PlatformWindows-focusedWindows / Linux / macOS / Docker

Quick Start: TextControl to IronPDF Migration

The migration can begin immediately with these foundational steps.

Step 1: Replace NuGet Packages

TX Text Control's headless server runtime is not distributed as a single public NuGet package - the public package is TXTextControl.Web (the editor companion), and the actual ServerTextControl runtime ships via the licensed Windows installer/MSI or the vendor's private NuGet feed. Removal usually means uninstalling those installer-shipped packages plus TXTextControl.Web and uninstalling the MSI.

# Remove TX Text Control packages (names depend on which were installed
# from the licensed installer / private feed / public NuGet)
dotnet remove package TXTextControl.Web

# Then install IronPDF (single self-contained package)
dotnet add package IronPdf
SHELL

Step 2: Update Namespaces

Replace TextControl namespaces with the IronPDF namespace:

// Before (TextControl)
using TXTextControl;
using TXTextControl.DocumentServer;

// After (IronPDF)
using IronPdf;

Step 3: Initialize License

Add license initialization at application startup:

IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";

Code Migration Examples

Converting HTML to PDF

The most common use case demonstrates the architectural difference between these .NET PDF libraries.

TextControl Approach:

// NuGet: Install-Package TXTextControl.Server
using TXTextControl;
using System.IO;

namespace TextControlExample
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ServerTextControl textControl = new ServerTextControl())
            {
                textControl.Create();
                
                string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";
                
                textControl.Load(html, StringStreamType.HTMLFormat);
                textControl.Save("output.pdf", StreamType.AdobePDF);
            }
        }
    }
}
C#

IronPDF Approach:

// NuGet: Install-Package IronPdf
using IronPdf;

namespace IronPdfExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var renderer = new ChromePdfRenderer();
            
            string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";
            
            var pdf = renderer.RenderHtmlAsPdf(html);
            pdf.SaveAs("output.pdf");
        }
    }
}

The TextControl version requires creating a ServerTextControl instance, calling Create() to initialize the context, loading HTML with StreamType.HTMLFormat, and saving with StreamType.AdobePDF. The using block is mandatory for proper resource disposal.

IronPDF eliminates context management entirely. The ChromePdfRenderer requires no initialization ceremony - create it, render HTML, and save. This architectural simplification reduces cognitive load and potential resource management bugs.

For advanced HTML-to-PDF scenarios, see the HTML to PDF conversion guide.

Merging Multiple PDFs

PDF merging reveals another significant complexity difference between these libraries.

TextControl Approach:

// NuGet: Install-Package TXTextControl.Server
using TXTextControl;
using System.IO;

namespace TextControlExample
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ServerTextControl textControl = new ServerTextControl())
            {
                textControl.Create();
                
                byte[] pdf1 = File.ReadAllBytes("document1.pdf");
                textControl.Load(pdf1, BinaryStreamType.AdobePDF);

                byte[] pdf2 = File.ReadAllBytes("document2.pdf");
                textControl.Append(pdf2, BinaryStreamType.AdobePDF, AppendSettings.StartWithNewSection);

                textControl.Save("merged.pdf", StreamType.AdobePDF);
            }
        }
    }
}
C#

IronPDF Approach:

// NuGet: Install-Package IronPdf
using IronPdf;

namespace IronPdfExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var pdf1 = PdfDocument.FromFile("document1.pdf");
            var pdf2 = PdfDocument.FromFile("document2.pdf");
            
            var merged = PdfDocument.Merge(pdf1, pdf2);
            merged.SaveAs("merged.pdf");
        }
    }
}

TextControl requires reading files into byte arrays, managing the ServerTextControl context, and calling Append with BinaryStreamType.AdobePDF and AppendSettings.StartWithNewSection to concatenate documents. IronPDF's PdfDocument.Merge() method handles everything with a single, explicit call.

For advanced merging scenarios including selective page extraction, see the merge and split PDFs guide.

Adding Headers and Footers

Headers and footers with dynamic page numbers demonstrate the API complexity difference.

TextControl Approach:

// NuGet: Install-Package TXTextControl.Server
using TXTextControl;
using System.IO;

namespace TextControlExample
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ServerTextControl textControl = new ServerTextControl())
            {
                textControl.Create();
                
                string html = "<html><body><h1>Document Content</h1><p>Main body text.</p></body></html>";
                textControl.Load(html, StringStreamType.HTMLFormat);
                
                HeaderFooter header = new HeaderFooter(HeaderFooterType.Header);
                header.Text = "Document Header";
                textControl.Sections[0].HeadersAndFooters.Add(header);
                
                HeaderFooter footer = new HeaderFooter(HeaderFooterType.Footer);
                footer.Text = "Page {page} of {numpages}";
                textControl.Sections[0].HeadersAndFooters.Add(footer);
                
                textControl.Save("output.pdf", StreamType.AdobePDF);
            }
        }
    }
}
C#

IronPDF Approach:

// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;

namespace IronPdfExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var renderer = new ChromePdfRenderer();
            
            string html = "<html><body><h1>Document Content</h1><p>Main body text.</p></body></html>";
            
            var pdf = renderer.RenderHtmlAsPdf(html);
            
            pdf.AddTextHeader("Document Header");
            pdf.AddTextFooter("Page {page} of {total-pages}");
            
            pdf.SaveAs("output.pdf");
        }
    }
}

TextControl requires creating HeaderFooter objects with specific HeaderFooterType enums, accessing document sections through textControl.Sections[0], and adding to the HeadersAndFooters collection. IronPDF provides direct AddTextHeader and AddTextFooter methods (via TextHeaderFooter) with simple placeholder syntax.

For HTML-based headers with full styling control, IronPDF also supports HtmlHeaderFooter:

renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: center; font-size: 12pt;'>
            Company Report
        </div>",
    MaxHeight = 30
};

renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: right; font-size: 10pt;'>
            Page {page} of {total-pages}
        </div>",
    MaxHeight = 25
};

Learn more about header and footer options in the headers and footers documentation.

TextControl API to IronPDF Mapping Reference

This mapping accelerates migration by showing direct API equivalents:

TX Text ControlIronPDF
ServerTextControl.Create()new ChromePdfRenderer()
tx.Load(html, StringStreamType.HTMLFormat)renderer.RenderHtmlAsPdf(html)
tx.Load(bytes, BinaryStreamType.AdobePDF)PdfDocument.FromFile(...) / FromBinaryData(...)
tx.Save(path, StreamType.AdobePDF)pdf.SaveAs(path)
tx.Append(bytes, BinaryStreamType.AdobePDF, AppendSettings.StartWithNewSection)PdfDocument.Merge(a, b)
SaveSettings.PDFAConformanceRenderingOptions.PdfAFormat
DocumentServer.MailMergeHTML templates + Razor
HeaderFooter + Sections[i].HeadersAndFootersHtmlHeaderFooter / TextHeaderFooter
LoadSettingsRenderingOptions
StreamType.AdobePDFDefault output

Common Migration Issues and Solutions

Issue 1: ServerTextControl Context

TextControl requires Create() and using block for every operation.

Solution: IronPDF has no context management:

// Just create and use
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);

Issue 2: StreamType Conversions

TextControl juggles three different enums - StringStreamType for string overloads, BinaryStreamType for byte[] overloads, and StreamType for file-path Save - to load different formats and export to PDF.

Solution: IronPDF renders HTML directly without intermediate format conversion:

// No format conversion needed
var pdf = renderer.RenderHtmlAsPdf(html);

Issue 3: DOCX Templates

TextControl uses DOCX files for templates with mail merge.

Solution: Convert to HTML templates with C# string interpolation or Razor:

var data = new { CustomerName = "John Doe", InvoiceNumber = "12345", Total = "$1,500.00" };

var html = $@"
<html>
<head>
    <style>
        body {{ font-family: Arial; padding: 40px; }}
        h1 {{ color: #333; }}
        .total {{ font-size: 24px; color: green; }}
    </style>
</head>
<body>
    <h1>Invoice #{data.InvoiceNumber}</h1>
    <p>Customer: {data.CustomerName}</p>
    <p class='total'>Total: {data.Total}</p>
</body>
</html>";

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("invoice.pdf");

Issue 4: STA-Affinity in ASP.NET

TextControl ServerTextControl historically traces back to a STA COM-style component model and is most reliable when hosted on STA-compatible threads (e.g. [ASPCOMPAT] in classic Web Forms, or wrapping calls on a dedicated STA thread/queue in ASP.NET Core). Mixing it freely with MTA worker threads can produce occasional thread-affinity errors under load.

Solution: IronPDF has no STA requirement and runs unmodified on MTA worker threads, in async controllers, and inside Linux containers under .NET 6/7/8/9.

TextControl Migration Checklist

Pre-Migration Tasks

Audit your codebase to identify all TextControl usage:

grep -r "using TXTextControl" --include="*.cs" .
grep -r "ServerTextControl\|Load\|Save" --include="*.cs" .
SHELL

Document mail merge templates for conversion to HTML. Note header/footer requirements for implementation with HtmlHeaderFooter. Identify any DOCX editing functionality that may require alternative solutions.

Code Update Tasks

  1. Remove TX Text Control NuGet packages
  2. Install IronPDF NuGet package
  3. Remove ServerTextControl context management (no more Create() calls)
  4. Convert StringStreamType.HTMLFormat loads to RenderHtmlAsPdf
  5. Convert mail merge to HTML templates with string interpolation or Razor
  6. Update headers/footers to use HtmlHeaderFooter or AddTextHeader/AddTextFooter
  7. Simplify page settings using RenderingOptions
  8. Add license initialization at startup

Post-Migration Testing

After migration, verify these aspects:

  • Test all document templates render correctly
  • Verify PDF/A compliance if required
  • Test password protection functionality
  • Verify headers/footers appear on all pages
  • Verify ASP.NET Core hosting on MTA worker threads and Linux containers - IronPDF has no STA-affinity requirement

Key Benefits of Migrating to IronPDF

Moving from TextControl to IronPDF provides several advantages for teams focused on PDF generation:

PDF-First Architecture: IronPDF is tailored specifically for PDF generation, offering document creation and rendering capabilities by leveraging modern HTML5 and CSS3 standards.

Cost Efficiency: IronPDF's one-time per-developer pricing compares favorably with TX Text Control .NET Server's $4,198 perpetual + 1yr entry tier and ~40%/yr renewal model, particularly once separate server runtime licensing is factored in.

No STA-Affinity: IronPDF runs on standard MTA worker threads in ASP.NET Core, async controllers, and Linux containers without the STA-compatible hosting considerations that ServerTextControl inherits from its COM-style threading model.

No Context Management: Eliminate the ServerTextControl creation ceremony and the three-enum (StringStreamType / BinaryStreamType / StreamType) load/save dance - ChromePdfRenderer is stateless.

Modern Rendering Engine: IronPDF's Chromium-based rendering targets current HTML5/CSS3/JavaScript standards rather than a word-processing-engine HTML import path.

Please note: Text Control is a registered trademark of its respective owner. This site is not affiliated with, endorsed by, or sponsored by Text Control. All product names, logos, and brands are property of their respective owners. Comparisons are for informational purposes only and reflect publicly available information at the time of writing.
Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required