IRONSOFTWAREHOME
MIGRATION GUIDES

How to Migrate from Apryse PDF to IronPDF in C#

Curtis Chau
Curtis Chau
Updated: August 1, 2026

Apryse (rebranded from PDFTron on February 8, 2023) is an enterprise PDF SDK known for its comprehensive document processing capabilities. The NuGet packages and .NET namespaces continue to ship under the historical PDFTron.* / pdftron.* IDs after the rebrand. Apryse uses sales-led pricing - public price points are not published on apryse.com, and third-party marketplaces (Vendr, G2) report entry quotes from roughly $1,500/developer/year. Combined with module-path setup and C++-heritage APIs, that can create barriers for teams seeking straightforward PDF functionality. This guide provides a step-by-step migration path from Apryse to IronPDF - a native .NET PDF library with modern C# conventions, simpler integration, and one-time perpetual licensing.

Why Migrate Away from Apryse PDF?

While Apryse PDF delivers robust functionality, several factors drive development teams to seek alternatives for their PDF generation needs.

Premium Pricing and Subscription Model

Apryse targets enterprise customers with sales-led pricing that can be prohibitive for small to medium-sized projects. Public price points are not published on apryse.com; the figures below come from third-party aggregators (Vendr, G2) and should be confirmed with Apryse sales:

AspectApryse (PDFTron)IronPDF
Entry-level~$1,500/developer/year (reported by Vendr)$999 one-time (Lite)
Typical range~$9,275-$35,816/year (per Vendr marketplace data)Tiered Lite/Plus/Professional
License ModelAnnual subscription, sales-led quotePerpetual license
Viewer LicenseWebViewer/PDFViewCtrl priced separatelyN/A (use standard viewers)
Server LicenseEnterprise pricing requiredIncluded in license tiers

Complexity of Integration

Apryse's C++ heritage shapes the .NET surface, which can add setup steps relative to a managed-only package:

FeatureApryse PDFIronPDF
SetupModule paths, external binariesSingle NuGet package
InitializationPDFNet.Initialize() with licenseSimple property assignment
HTML RenderingExternal html2pdf module requiredBuilt-in Chromium engine
API StyleC++ heritage, complexModern C# conventions
DependenciesMultiple DLLs, platform-specificSelf-contained package

When to Consider Migration

Migrate to IronPDF if:

  • You primarily need HTML/URL to PDF conversion
  • You want simpler API with less boilerplate
  • Premium pricing isn't justified for your use case
  • You don't need PDFViewCtrl viewer controls
  • You prefer one-time licensing over subscriptions

Stay with Apryse PDF if:

  • You need their native viewer controls (PDFViewCtrl)
  • You use XOD or proprietary formats extensively
  • You require specific enterprise features (advanced redaction, etc.)
  • Your organization already has enterprise licenses

Pre-Migration Preparation

Prerequisites

Ensure your environment meets these requirements:

  • .NET Framework 4.6.2+, .NET Core 3.1+, or .NET 5/6/7/8/9
  • Visual Studio 2019+ or VS Code with C# extension
  • NuGet Package Manager access
  • IronPDF license key (free trial available at ironpdf.com)

Audit Apryse PDF Usage

Run these commands in your solution directory to identify all Apryse references:

# Find all pdftron using statements
grep -r "using pdftron" --include="*.cs" .

# Find PDFNet initialization
grep -r "PDFNet.Initialize\|PDFNet.SetResourcesPath" --include="*.cs" .

# Find PDFDoc usage
grep -r "new PDFDoc\|PDFDoc\." --include="*.cs" .

# Find HTML2PDF usage
grep -r "HTML2PDF\|InsertFromURL\|InsertFromHtmlString" --include="*.cs" .

# Find ElementReader/Writer usage
grep -r "ElementReader\|ElementWriter\|ElementBuilder" --include="*.cs" .
SHELL

Breaking Changes to Anticipate

Apryse PDF PatternChange Required
PDFNet.Initialize()Replace with IronPdf.License.LicenseKey
HTML2PDF moduleBuilt-in ChromePdfRenderer
ElementReader/ElementWriterIronPDF handles content internally
SDFDoc.SaveOptionsSimple SaveAs() method
PDFViewCtrlUse external PDF viewers
XOD formatConvert to PDF or images
Module path configurationNot needed

Step-by-Step Migration Process

Step 1: Update NuGet Packages

Apryse publishes the .NET SDK under several PDFTron.* package IDs depending on target framework and architecture (the brand changed in 2023, but the package IDs did not). Common ones:

  • PDFTron.NET.x64 - primary .NET / .NET Core x64 package (current 11.x)
  • PDFTron.NetFramework.x64 - .NET Framework 4.5.1+ x64 only
  • PDFTron.NETCore.Windows.x64 - .NET Core on Windows x64
  • PDFNet - legacy combined Windows .NET Framework 32/64-bit package
# Remove whichever Apryse/PDFTron package(s) you have installed
dotnet remove package PDFTron.NET.x64
dotnet remove package PDFTron.NetFramework.x64
dotnet remove package PDFTron.NETCore.Windows.x64
dotnet remove package PDFNet

# Install IronPDF
dotnet add package IronPdf
SHELL

Or via Package Manager Console:

Uninstall-Package PDFTron.NET.x64
Install-Package IronPdf
PowerShell

Step 2: Update Namespace References

Replace Apryse namespaces with IronPDF:

// Remove these
using pdftron;
using pdftron.PDF;
using pdftron.PDF.Convert;
using pdftron.SDF;
using pdftron.Filters;

// Add these
using IronPdf;
using IronPdf.Rendering;

Step 3: Remove Initialization Boilerplate

Apryse PDF requires complex initialization. IronPDF eliminates this entirely.

Apryse PDF Implementation:

// Complex initialization
PDFNet.Initialize("YOUR_LICENSE_KEY");
PDFNet.SetResourcesPath("path/to/resources");
// Plus module path for HTML2PDF...

IronPDF Implementation:

// Simple license assignment (optional for development)
IronPdf.License.LicenseKey = "YOUR_LICENSE_KEY";

No PDFNet.Terminate() call is needed with IronPDF - resources are managed automatically.

Complete API Migration Reference

Core Class Mapping

Apryse PDF ClassIronPDF Equivalent
PDFDocPdfDocument
HTML2PDFChromePdfRenderer
TextExtractorPdfDocument.ExtractAllText()
StamperPdfDocument.ApplyWatermark()
PDFDrawPdfDocument.ToBitmap()
SecurityHandlerPdfDocument.SecuritySettings
PDFNetIronPdf.License

Document Operations

Apryse PDF MethodIronPDF Method
new PDFDoc()new PdfDocument()
new PDFDoc(path)PdfDocument.FromFile(path)
new PDFDoc(buffer)PdfDocument.FromBinaryData(bytes)
doc.Save(path, options)pdf.SaveAs(path)
doc.Save(buffer)pdf.BinaryData
doc.Close()pdf.Dispose()
doc.GetPageCount()pdf.PageCount
doc.AppendPages(doc2, start, end)PdfDocument.Merge(pdfs)

HTML to PDF Conversion

Apryse PDF MethodIronPDF Method
HTML2PDF.Convert(doc)renderer.RenderHtmlAsPdf(html)
converter.InsertFromURL(url)renderer.RenderUrlAsPdf(url)
converter.InsertFromHtmlString(html)renderer.RenderHtmlAsPdf(html)
converter.SetModulePath(path)Not needed
converter.SetPaperSize(width, height)RenderingOptions.PaperSize
converter.SetLandscape(true)RenderingOptions.PaperOrientation

Code Migration Examples

HTML String to PDF

The most common operation demonstrates the dramatic reduction in boilerplate code.

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;

class Program
{
    static void Main()
    {
        PDFNet.Initialize("YOUR_LICENSE_KEY");
        PDFNet.SetResourcesPath("path/to/resources");

        string html = "<html><body><h1>Hello World</h1><p>Content here</p></body></html>";

        using (PDFDoc doc = new PDFDoc())
        {
            HTML2PDF converter = new HTML2PDF();
            converter.SetModulePath("path/to/html2pdf");
            converter.InsertFromHtmlString(html);

            HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
            settings.SetPrintBackground(true);
            settings.SetLoadImages(true);

            if (converter.Convert(doc))
            {
                doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
                Console.WriteLine("PDF created successfully");
            }
            else
            {
                Console.WriteLine($"Conversion failed: {converter.GetLog()}");
            }
        }

        PDFNet.Terminate();
    }
}

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        
        string html = "<html><body><h1>Hello World</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);
        
        pdf.SaveAs("output.pdf");
    }
}

IronPDF eliminates initialization, module paths, and cleanup code - reducing 35+ lines to 5 lines.

URL to PDF Conversion

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;

PDFNet.Initialize("YOUR_LICENSE_KEY");

using (PDFDoc doc = new PDFDoc())
{
    HTML2PDF converter = new HTML2PDF();
    converter.SetModulePath("path/to/html2pdf");

    HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
    settings.SetLoadImages(true);
    settings.SetAllowJavaScript(true);
    settings.SetPrintBackground(true);

    converter.InsertFromURL("https://example.com", settings);

    if (converter.Convert(doc))
    {
        doc.Save("webpage.pdf", SDFDoc.SaveOptions.e_linearized);
    }
}

PDFNet.Terminate();

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        
        string url = "https://www.example.com";
        var pdf = renderer.RenderUrlAsPdf(url);
        
        pdf.SaveAs("webpage.pdf");
    }
}

Merging Multiple PDFs

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;

PDFNet.Initialize("YOUR_LICENSE_KEY");

using (PDFDoc mainDoc = new PDFDoc())
{
    string[] files = { "doc1.pdf", "doc2.pdf", "doc3.pdf" };

    foreach (string file in files)
    {
        using (PDFDoc doc = new PDFDoc(file))
        {
            mainDoc.AppendPages(doc, 1, doc.GetPageCount());
        }
    }

    mainDoc.Save("merged.pdf", SDFDoc.SaveOptions.e_linearized);
}

PDFNet.Terminate();

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using IronPdf;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");
        
        var merged = PdfDocument.Merge(new List<PdfDocument> { pdf1, pdf2 });
        
        merged.SaveAs("merged.pdf");
    }
}

IronPDF's static Merge method accepts multiple documents directly, eliminating the page iteration pattern.

Text Extraction

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;

PDFNet.Initialize("YOUR_LICENSE_KEY");

using (PDFDoc doc = new PDFDoc("document.pdf"))
{
    TextExtractor extractor = new TextExtractor();

    for (int i = 1; i <= doc.GetPageCount(); i++)
    {
        Page page = doc.GetPage(i);
        extractor.Begin(page);

        string pageText = extractor.GetAsText();
        Console.WriteLine($"Page {i}:");
        Console.WriteLine(pageText);
    }
}

PDFNet.Terminate();

IronPDF Implementation:

using IronPdf;

var pdf = PdfDocument.FromFile("document.pdf");

// Extract all text at once
string allText = pdf.ExtractAllText();
Console.WriteLine(allText);

// Extract from specific page
string page1Text = pdf.ExtractTextFromPage(0); // 0-indexed
Console.WriteLine($"Page 1: {page1Text}");

Adding Watermarks

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;

PDFNet.Initialize("YOUR_LICENSE_KEY");

using (PDFDoc doc = new PDFDoc("document.pdf"))
{
    Stamper stamper = new Stamper(Stamper.SizeType.e_relative_scale, 0.5, 0.5);
    stamper.SetAlignment(Stamper.HorizontalAlignment.e_horizontal_center,
                         Stamper.VerticalAlignment.e_vertical_center);
    stamper.SetOpacity(0.3);
    stamper.SetRotation(45);
    stamper.SetFontColor(new ColorPt(1, 0, 0));
    stamper.SetTextAlignment(Stamper.TextAlignment.e_align_center);

    stamper.StampText(doc, "CONFIDENTIAL",
        new PageSet(1, doc.GetPageCount()));

    doc.Save("watermarked.pdf", SDFDoc.SaveOptions.e_linearized);
}

PDFNet.Terminate();

IronPDF Implementation:

using IronPdf;
using IronPdf.Editing;

var pdf = PdfDocument.FromFile("document.pdf");

// HTML-based watermark with full styling control
string watermarkHtml = @"
<div style='
    color: red;
    opacity: 0.3;
    font-size: 72px;
    font-weight: bold;
    text-align: center;
'>CONFIDENTIAL</div>";

pdf.ApplyWatermark(watermarkHtml,
    rotation: 45,
    verticalAlignment: VerticalAlignment.Middle,
    horizontalAlignment: HorizontalAlignment.Center);

pdf.SaveAs("watermarked.pdf");

IronPDF uses HTML/CSS-based watermarking, providing full styling control through familiar web technologies.

Password Protection

Apryse PDF Implementation:

using pdftron;
using pdftron.PDF;
using pdftron.SDF;

PDFNet.Initialize("YOUR_LICENSE_KEY");

using (PDFDoc doc = new PDFDoc("document.pdf"))
{
    SecurityHandler handler = new SecurityHandler();
    handler.ChangeUserPassword("user123");
    handler.ChangeMasterPassword("owner456");

    handler.SetPermission(SecurityHandler.Permission.e_print, false);
    handler.SetPermission(SecurityHandler.Permission.e_extract_content, false);

    doc.SetSecurityHandler(handler);
    doc.Save("protected.pdf", SDFDoc.SaveOptions.e_linearized);
}

PDFNet.Terminate();

IronPDF Implementation:

using IronPdf;

var pdf = PdfDocument.FromFile("document.pdf");

// Set passwords
pdf.SecuritySettings.UserPassword = "user123";
pdf.SecuritySettings.OwnerPassword = "owner456";

// Set permissions
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.NoPrint;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit;

pdf.SaveAs("protected.pdf");

Headers and Footers

IronPDF Implementation:

using IronPdf;

var renderer = new ChromePdfRenderer();

renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
    HtmlFragment = "<div style='text-align:center; font-size:12px;'>Company Header</div>",
    DrawDividerLine = true,
    MaxHeight = 30
};

renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = "<div style='text-align:center; font-size:10px;'>Page {page} of {total-pages}</div>",
    DrawDividerLine = true,
    MaxHeight = 25
};

var pdf = renderer.RenderHtmlAsPdf("<h1>Content</h1>");
pdf.SaveAs("with_headers.pdf");

IronPDF supports placeholder tokens like {page} and {total-pages} for dynamic page numbering. For more options, see the headers and footers documentation.

ASP.NET Core Integration

Apryse PDF's initialization requirements complicate web application integration. IronPDF simplifies this pattern.

IronPDF Pattern:

[ApiController]
[Route("[controller]")]
public class PdfController : ControllerBase
{
    [HttpGet("generate")]
    public IActionResult GeneratePdf()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf("<h1>Report</h1>");

        return File(pdf.BinaryData, "application/pdf", "report.pdf");
    }

    [HttpGet("generate-async")]
    public async Task<IActionResult> GeneratePdfAsync()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = await renderer.RenderHtmlAsPdfAsync("<h1>Report</h1>");

        return File(pdf.BinaryData, "application/pdf", "report.pdf");
    }
}

Dependency Injection Configuration

// Program.cs
public void ConfigureServices(IServiceCollection services)
{
    // Set license once
    IronPdf.License.LicenseKey = Configuration["IronPdf:LicenseKey"];

    // Register renderer as scoped service
    services.AddScoped<ChromePdfRenderer>();

    // Or create a wrapper service
    services.AddScoped<IPdfService, IronPdfService>();
}

// IronPdfService.cs
public class IronPdfService : IPdfService
{
    private readonly ChromePdfRenderer _renderer;

    public IronPdfService()
    {
        _renderer = new ChromePdfRenderer();
        _renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
        _renderer.RenderingOptions.PrintHtmlBackgrounds = true;
    }

    public PdfDocument GenerateFromHtml(string html) =>
        _renderer.RenderHtmlAsPdf(html);

    public Task<PdfDocument> GenerateFromHtmlAsync(string html) =>
        _renderer.RenderHtmlAsPdfAsync(html);
}

Performance Comparison

MetricApryse PDFIronPDF
Cold startFast (native code)~2s (Chromium init)
Subsequent rendersFastFast
Complex HTMLVariable (html2pdf module)Excellent (Chromium)
CSS supportLimitedFull CSS3
JavaScriptLimitedSupported

Performance Optimization Tips

// 1. Reuse renderer instance
private static readonly ChromePdfRenderer SharedRenderer = new ChromePdfRenderer();

// 2. Disable unnecessary features for speed
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.EnableJavaScript = false; // If not needed
renderer.RenderingOptions.WaitFor.RenderDelay(0);   // No delay
renderer.RenderingOptions.Timeout = 30000;          // 30s max

// 3. Proper disposal
using (var pdf = renderer.RenderHtmlAsPdf(html))
{
    pdf.SaveAs("output.pdf");
}

Troubleshooting Common Migration Issues

Issue: Module Path Errors

Remove all module path configuration - IronPDF's Chromium engine is built-in:

// Remove this
converter.SetModulePath("path/to/html2pdf");

// Just use the renderer
var renderer = new ChromePdfRenderer();

Issue: PDFNet.Initialize() Not Found

Replace with IronPDF license setup:

// Remove this
PDFNet.Initialize("KEY");
PDFNet.SetResourcesPath("path");

// Use this (optional for development)
IronPdf.License.LicenseKey = "YOUR-KEY";

Issue: PDFViewCtrl Replacement

IronPDF doesn't include viewer controls. Options:

  • Use PDF.js for web viewers
  • Use system PDF viewers
  • Consider third-party viewer components

Post-Migration Checklist

After completing the code migration, verify the following:

  • Verify PDF output quality matches expectations
  • Test all edge cases (large documents, complex CSS)
  • Compare performance metrics
  • Update Docker configurations if applicable
  • Remove Apryse license and related configurations
  • Document any IronPDF-specific configurations
  • Train team on new API patterns
  • Update CI/CD pipelines if needed

Additional Resources


Migrating from Apryse PDF to IronPDF transforms your PDF codebase from complex C++ patterns to idiomatic C#. The elimination of initialization boilerplate, module path configuration, and subscription-based licensing delivers immediate productivity gains while reducing long-term costs.

Please note: Apryse is a registered trademark of its respective owner. This site is not affiliated with, endorsed by, or sponsored by Apryse or PDFTron. 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