Skip to footer content
MIGRATION GUIDES

How to Migrate from ABCpdf for .NET to IronPDF

Switching from ABCpdf for .NET to IronPDF is a strategic upgrade for development teams aiming for simplified licensing, modern documentation, and native cross-platform support. This thorough guide offers a step-by-step migration path, complete with API mappings and code conversion examples from real-world scenarios.

Whether you're working with .NET Framework 4.6.2 or targeting .NET 9 and beyond into 2026, this ABCpdf migration guide ensures an easy transition to IronPDF's Chrome-based rendering engine.

Why Consider an ABCpdf Migration?

ABCpdf from WebSupergoo has been a capable .NET PDF library for years. However, several factors make IronPDF an appealing alternative for modern development teams planning projects into 2025 and 2026.

Licensing Complexity

ABCpdf uses a tiered licensing model that can be confusing to handle. Pricing starts at $349 but increases based on features, server deployments, and use cases. Many developers report this licensing maze as a significant administrative burden when budgeting for projects.

Windows-First Architecture

While ABCpdf has added cross-platform support, its historical Windows-centric design occasionally surfaces in workflows. Developers targeting Linux containers, Docker environments, or macOS development setups may encounter friction that wasn't anticipated during project planning.

Documentation Style

ABCpdf's documentation, while thorough, follows an older style that can feel dated compared to modern API documentation standards. New users often struggle to find the exact examples they need, particularly when working with newer .NET versions.

Engine Configuration Overhead

ABCpdf requires explicit engine selection (Gecko, Trident, or Chrome) and manual resource management with Clear() calls. This adds boilerplate code to every PDF operation that modern developers would prefer to avoid.

IronPDF vs ABCpdf: Feature Comparison

The following comparison table highlights key differences between the two .NET PDF libraries:

FeatureABCpdf for .NETIronPDF
Rendering EngineGecko/Trident/Chrome (configurable)Full Chromium (CSS3, JavaScript)
Cross-PlatformAdded later, Windows-firstNative Windows, Linux, macOS, Docker
Licensing ModelComplex tiered pricing from $349+Simple, transparent pricing
.NET Support.NET Framework focusFramework 4.6.2 to .NET 9+
Resource ManagementManual doc.Clear() requiredIDisposable with using statements
License SetupOften uses registrySimple code-based license key
DocumentationDated styleModern docs with extensive examples

Before You Start Your Migration

Prerequisites

Ensure your development environment meets these requirements:

  • .NET Framework 4.6.2+ or .NET Core 3.1+ / .NET 5-9
  • Visual Studio 2019+ or JetBrains Rider
  • NuGet Package Manager access
  • IronPDF license key (free trial available)

Find All ABCpdf References

Run these commands in your solution directory to locate all files using ABCpdf for .NET:

grep -r "using WebSupergoo" --include="*.cs" .
grep -r "ABCpdf" --include="*.csproj" .
grep -r "using WebSupergoo" --include="*.cs" .
grep -r "ABCpdf" --include="*.csproj" .
SHELL

This audit identifies every file requiring modification, ensuring complete migration coverage.

Breaking Changes to Anticipate

Understanding the architectural differences between ABCpdf for .NET and IronPDF prevents surprises during migration:

CategoryABCpdf BehaviorIronPDF BehaviorMigration Action
Object ModelDoc class is centralChromePdfRenderer + PdfDocumentSeparate rendering from document
Resource CleanupManual doc.Clear()IDisposable patternUse using statements
Engine Selectiondoc.HtmlOptions.Engine = EngineType.ChromeBuilt-in ChromeRemove engine config
Page Indexing1-based (doc.Page = 1)0-based (pdf.Pages[0])Adjust index references
CoordinatesPoint-based with doc.RectCSS-based marginsUse CSS or RenderingOptions

Quick Start: 5-Minute Migration

Step 1: Update NuGet Packages

# Remove ABCpdf
dotnet remove package ABCpdf

# Install IronPDF
dotnet add package IronPdf
# Remove ABCpdf
dotnet remove package ABCpdf

# Install IronPDF
dotnet add package IronPdf
SHELL

Step 2: Set Your License Key

Add this at application startup, before any IronPDF operations:

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
$vbLabelText   $csharpLabel

Step 3: Global Find and Replace

Update all namespace references throughout your codebase:

FindReplace With
using WebSupergoo.ABCpdf13;using IronPdf;
using WebSupergoo.ABCpdf13.Objects;using IronPdf;
using WebSupergoo.ABCpdf12;using IronPdf;
using WebSupergoo.ABCpdf11;using IronPdf;

Complete API Reference

Document Creation Methods

The following table maps ABCpdf for .NET methods to their IronPDF equivalents:

ABCpdf MethodIronPDF MethodNotes
new Doc()new ChromePdfRenderer()Renderer creates PDFs
doc.AddImageUrl(url)renderer.RenderUrlAsPdf(url)URL to PDF conversion
doc.AddImageHtml(html)renderer.RenderHtmlAsPdf(html)HTML string to PDF
doc.AddImageFile(path)renderer.RenderHtmlFileAsPdf(path)HTML file to PDF
doc.Read(path)PdfDocument.FromFile(path)Load existing PDF
doc.Save(path)pdf.SaveAs(path)Save to file
doc.GetData()pdf.BinaryDataGet as byte array
doc.Clear()Use using statementAutomatic disposal

Page Manipulation Methods

ABCpdf MethodIronPDF MethodNotes
doc.PageCountpdf.PageCountSame usage
doc.Page = npdf.Pages[n-1]ABCpdf is 1-indexed, IronPDF is 0-indexed
doc.Delete(pageId)pdf.RemovePages(index)Remove pages
doc.Append(otherDoc)PdfDocument.Merge(pdf1, pdf2)Static merge method
doc.Rect.Inset(x, y)RenderingOptions.MarginTop/Bottom/Left/RightMargins

Security and Encryption Methods

ABCpdf MethodIronPDF MethodNotes
doc.Encryption.Passwordpdf.SecuritySettings.OwnerPasswordOwner password
doc.Encryption.CanPrintpdf.SecuritySettings.AllowUserPrintingPrint permission
doc.Encryption.CanCopypdf.SecuritySettings.AllowUserCopyPasteContentCopy permission
doc.SetInfo("Title", value)pdf.MetaData.TitleDocument metadata

Code Migration Examples

Example 1: HTML to PDF from URL

This example demonstrates converting a web page to PDF, one of the most common PDF generation tasks.

ABCpdf for .NET Implementation:

// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        Doc doc = new Doc();
        doc.HtmlOptions.Engine = EngineType.Chrome;
        doc.AddImageUrl("https://www.example.com");
        doc.Save("output.pdf");
        doc.Clear();
    }
}
// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        Doc doc = new Doc();
        doc.HtmlOptions.Engine = EngineType.Chrome;
        doc.AddImageUrl("https://www.example.com");
        doc.Save("output.pdf");
        doc.Clear();
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using System;
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://www.example.com");
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using System;
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://www.example.com");
        pdf.SaveAs("output.pdf");
    }
}
$vbLabelText   $csharpLabel

IronPDF's approach eliminates the need for explicit engine configuration and manual cleanup, reducing code complexity while maintaining full Chrome rendering capabilities.

Example 2: HTML String to PDF

Converting HTML strings to PDF is essential for generating dynamic reports and documents.

ABCpdf for .NET Implementation:

// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";
        Doc doc = new Doc();
        doc.HtmlOptions.Engine = EngineType.Chrome;
        doc.AddImageHtml(html);
        doc.Save("output.pdf");
        doc.Clear();
    }
}
// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";
        Doc doc = new Doc();
        doc.HtmlOptions.Engine = EngineType.Chrome;
        doc.AddImageHtml(html);
        doc.Save("output.pdf");
        doc.Clear();
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

// NuGet: Install-Package IronPdf
using System;
using IronPdf;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using System;
using IronPdf;

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

The IronPDF version requires fewer lines of code and uses Chrome rendering by default, ensuring consistent output across all platforms.

Example 3: Merge Multiple PDFs

Combining multiple PDF documents is a frequent requirement in document processing workflows.

ABCpdf for .NET Implementation:

// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        Doc doc1 = new Doc();
        doc1.Read("document1.pdf");

        Doc doc2 = new Doc();
        doc2.Read("document2.pdf");

        doc1.Append(doc2);
        doc1.Save("merged.pdf");

        doc1.Clear();
        doc2.Clear();
    }
}
// NuGet: Install-Package ABCpdf
using System;
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

class Program
{
    static void Main()
    {
        Doc doc1 = new Doc();
        doc1.Read("document1.pdf");

        Doc doc2 = new Doc();
        doc2.Read("document2.pdf");

        doc1.Append(doc2);
        doc1.Save("merged.pdf");

        doc1.Clear();
        doc2.Clear();
    }
}
$vbLabelText   $csharpLabel

IronPDF Implementation:

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

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");
    }
}
// NuGet: Install-Package IronPdf
using System;
using System.Collections.Generic;
using IronPdf;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");
    }
}
$vbLabelText   $csharpLabel

IronPDF's static Merge method provides a cleaner API that accepts multiple documents, eliminating the need to track and clear individual Doc instances.

Example 4: Complete Migration Pattern with Margins

This example shows a complete before/after migration for generating PDFs with custom margins.

Before (ABCpdf for .NET):

using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

public byte[] GeneratePdf(string html)
{
    Doc doc = new Doc();
    doc.HtmlOptions.Engine = EngineType.Chrome;
    doc.Rect.Inset(20, 20);
    doc.AddImageHtml(html);
    byte[] data = doc.GetData();
    doc.Clear();  // Manual cleanup required
    return data;
}
using WebSupergoo.ABCpdf13;
using WebSupergoo.ABCpdf13.Objects;

public byte[] GeneratePdf(string html)
{
    Doc doc = new Doc();
    doc.HtmlOptions.Engine = EngineType.Chrome;
    doc.Rect.Inset(20, 20);
    doc.AddImageHtml(html);
    byte[] data = doc.GetData();
    doc.Clear();  // Manual cleanup required
    return data;
}
$vbLabelText   $csharpLabel

After (IronPDF):

using IronPdf;

public byte[] GeneratePdf(string html)
{
    var renderer = new ChromePdfRenderer();
    renderer.RenderingOptions.MarginTop = 20;
    renderer.RenderingOptions.MarginBottom = 20;
    renderer.RenderingOptions.MarginLeft = 20;
    renderer.RenderingOptions.MarginRight = 20;

    using var pdf = renderer.RenderHtmlAsPdf(html);
    return pdf.BinaryData;  // Automatic cleanup with 'using'
}
using IronPdf;

public byte[] GeneratePdf(string html)
{
    var renderer = new ChromePdfRenderer();
    renderer.RenderingOptions.MarginTop = 20;
    renderer.RenderingOptions.MarginBottom = 20;
    renderer.RenderingOptions.MarginLeft = 20;
    renderer.RenderingOptions.MarginRight = 20;

    using var pdf = renderer.RenderHtmlAsPdf(html);
    return pdf.BinaryData;  // Automatic cleanup with 'using'
}
$vbLabelText   $csharpLabel

Advanced Migration Scenarios

ASP.NET Core Web Application

For teams building web applications with .NET 6+ or planning for .NET 10 releases in 2025-2026, here's the recommended pattern:

ABCpdf Pattern:

[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    Doc doc = new Doc();
    doc.HtmlOptions.Engine = EngineType.Chrome;
    doc.AddImageHtml(request.Html);
    byte[] pdfBytes = doc.GetData();
    doc.Clear();

    return File(pdfBytes, "application/pdf", "report.pdf");
}
[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    Doc doc = new Doc();
    doc.HtmlOptions.Engine = EngineType.Chrome;
    doc.AddImageHtml(request.Html);
    byte[] pdfBytes = doc.GetData();
    doc.Clear();

    return File(pdfBytes, "application/pdf", "report.pdf");
}
$vbLabelText   $csharpLabel

IronPDF Pattern:

[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(request.Html);

    return File(pdf.BinaryData, "application/pdf", "report.pdf");
}
[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = renderer.RenderHtmlAsPdf(request.Html);

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

Async PDF Generation

ABCpdf doesn't have native async support. IronPDF provides async methods for better web application performance:

using IronPdf;

public async Task<byte[]> GeneratePdfAsync(string html)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return pdf.BinaryData;
}
using IronPdf;

public async Task<byte[]> GeneratePdfAsync(string html)
{
    var renderer = new ChromePdfRenderer();
    using var pdf = await renderer.RenderHtmlAsPdfAsync(html);
    return pdf.BinaryData;
}
$vbLabelText   $csharpLabel

Dependency Injection Setup

Register IronPDF in modern .NET applications using C# 12+ patterns compatible with future C# 14 releases:

// Program.cs (.NET 6+)
builder.Services.AddSingleton<ChromePdfRenderer>();

// Or create a service wrapper
public interface IPdfService
{
    Task<byte[]> GeneratePdfAsync(string html);
}

public class IronPdfService : IPdfService
{
    private readonly ChromePdfRenderer _renderer;

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

    public async Task<byte[]> GeneratePdfAsync(string html)
    {
        using var pdf = await _renderer.RenderHtmlAsPdfAsync(html);
        return pdf.BinaryData;
    }
}

// Register: builder.Services.AddSingleton<IPdfService, IronPdfService>();
// Program.cs (.NET 6+)
builder.Services.AddSingleton<ChromePdfRenderer>();

// Or create a service wrapper
public interface IPdfService
{
    Task<byte[]> GeneratePdfAsync(string html);
}

public class IronPdfService : IPdfService
{
    private readonly ChromePdfRenderer _renderer;

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

    public async Task<byte[]> GeneratePdfAsync(string html)
    {
        using var pdf = await _renderer.RenderHtmlAsPdfAsync(html);
        return pdf.BinaryData;
    }
}

// Register: builder.Services.AddSingleton<IPdfService, IronPdfService>();
$vbLabelText   $csharpLabel

Performance Optimization Tips

Reuse the Renderer for Batch Operations

// Good: Single renderer instance
var renderer = new ChromePdfRenderer();
foreach (var html in htmlList)
{
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}

// Bad: New renderer each time (slower startup)
foreach (var html in htmlList)
{
    var renderer = new ChromePdfRenderer(); // Overhead!
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}
// Good: Single renderer instance
var renderer = new ChromePdfRenderer();
foreach (var html in htmlList)
{
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}

// Bad: New renderer each time (slower startup)
foreach (var html in htmlList)
{
    var renderer = new ChromePdfRenderer(); // Overhead!
    using var pdf = renderer.RenderHtmlAsPdf(html);
    pdf.SaveAs($"output_{i}.pdf");
}
$vbLabelText   $csharpLabel

Memory Usage Comparison

ScenarioABCpdf for .NETIronPDFNotes
Single 10-page PDF~80 MB~50 MBIronPDF more efficient
Batch 100 PDFsHigh (manual cleanup)~100 MBUse using statements
Large HTML (5MB+)Variable~150 MBBoth need chunking for huge docs

Troubleshooting Common Migration Issues

PDF Renders Blank

Symptom: Output PDF has empty pages after migration.

Solution: JavaScript content may not be fully loaded before rendering:

var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.WaitFor.RenderDelay(2000); // Wait 2 seconds
// Or wait for specific element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded");
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.WaitFor.RenderDelay(2000); // Wait 2 seconds
// Or wait for specific element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded");
$vbLabelText   $csharpLabel

Headers/Footers Not Appearing

Symptom: TextHeader/TextFooter not visible in output.

Solution: Ensure margins leave room for header/footer content:

var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.MarginTop = 40; // mm - leave room for header
renderer.RenderingOptions.MarginBottom = 40; // mm - leave room for footer

renderer.RenderingOptions.TextHeader = new TextHeaderFooter
{
    CenterText = "Header Text",
    FontSize = 12
};
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.MarginTop = 40; // mm - leave room for header
renderer.RenderingOptions.MarginBottom = 40; // mm - leave room for footer

renderer.RenderingOptions.TextHeader = new TextHeaderFooter
{
    CenterText = "Header Text",
    FontSize = 12
};
$vbLabelText   $csharpLabel

Migration Checklist

Pre-Migration

  • Audit all ABCpdf usage with grep -r "WebSupergoo" --include="*.cs" .
  • Document current PDF output requirements
  • Create test cases with sample PDF outputs for comparison
  • Obtain IronPDF license key
  • Backup codebase

During Migration

  • Remove ABCpdf NuGet package
  • Install IronPdf NuGet package
  • Add license key to application startup
  • Update all using statements
  • Convert Doc instantiation to ChromePdfRenderer
  • Replace doc.Clear() with using statements
  • Update method calls per API mapping
  • Convert coordinate-based layouts to CSS margins

Post-Migration

  • Run all existing PDF tests
  • Visual comparison of PDF outputs (ABCpdf vs IronPDF)
  • Test all PDF workflows in staging
  • Performance benchmark comparison
  • Remove ABCpdf license configuration
  • Update CI/CD pipeline dependencies
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