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, 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.
Licensing Complexity
ABCpdf uses a tiered licensing model that can take effort to navigate. The Standard Single Computer license is $329 and is restricted to 32-bit processes; 64-bit support starts at the Professional tier at $495; a five-license pack is $1,485; redistribution and enterprise licensing is $4,950; and a group license runs to $24,950, alongside a quarterly SaaS subscription at $265. A current license key also covers the preceding major versions. Teams generally have to work out which tier their deployment model falls into before they can budget.
Windows-First Architecture
ABCpdf was Windows-only for most of its history. Linux support arrived in a later major release and needs a matching ABCChrome Linux runtime package referenced alongside the main library, on a supported Ubuntu release, x64 only. macOS is not supported, and features including the XPS and Office read modules, EMF handling, and the System.Drawing APIs remain Windows-only.
Documentation Style
ABCpdf's documentation is thorough and reference-complete, but it is organised as a classic API tree (a page per class, property, and method) rather than the task-oriented walkthroughs many teams now expect. Assembling a full scenario often means stitching together several member pages.
Engine Choice and Document Lifecycle
ABCpdf defaults to the current ABCChrome build, and teams often pin a specific engine (an older ABCChrome version, Gecko, WebKit, or the legacy MSHtml engine) to keep rendering stable. Anything other than the current ABCChrome build ships as a separate NuGet package to deploy. The Doc object is also a stateful canvas that you compose page by page and then clear or dispose, rather than a one-call render.
IronPDF vs ABCpdf: Feature Comparison
The following comparison table highlights key differences between the two .NET PDF libraries:
| Feature | ABCpdf for .NET | IronPDF |
|---|---|---|
| Rendering Engine | ABCChrome (versioned builds), Gecko, WebKit, MSHtml | Full Chromium (CSS3, JavaScript) |
| Cross-Platform | Windows-first; Linux added later (x64 only, no macOS) | Native Windows, Linux, macOS, Docker |
| Licensing Model | Tiered, from $329 to $24,950 depending on tier | Simple, transparent pricing |
| .NET Support | .NET Framework 4.0+ and current .NET releases | Framework 4.6.2 to .NET 9 |
| Object Lifecycle | Stateful Doc composed, then cleared or disposed | Render returns a disposable PdfDocument |
| License Setup | Code-based: XSettings.InstallLicense("KEY") | Simple code-based license key |
| Documentation | Classic API reference tree | Modern 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" .
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:
| Category | ABCpdf Behavior | IronPDF Behavior | Migration Action |
|---|---|---|---|
| Object Model | Doc class is central | ChromePdfRenderer + PdfDocument | Separate rendering from document |
| Resource Cleanup | doc.Clear() or using (Doc is IDisposable) | IDisposable pattern | Use using statements |
| Engine Selection | doc.HtmlOptions.Engine, optional and defaulting to the current ABCChrome build | Built-in Chromium | Remove engine config |
| Page Indexing | 1-based (doc.PageNumber = 1; doc.Page is a page object ID) | 0-based (pdf.Pages[0]) | Adjust index references |
| Coordinates | Point-based with doc.Rect (doc.Units defaults to points) | CSS-based margins in mm | Use 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
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.vb or Startup.vb)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"Step 3: Global Find and Replace
Update all namespace references throughout your codebase:
| Find | Replace With |
|---|---|
using WebSupergoo.ABCpdf14; | using IronPdf; |
using WebSupergoo.ABCpdf14.Objects; | using IronPdf; |
using WebSupergoo.ABCpdf13; | 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 Method | IronPDF Method |
|---|---|
new Doc() | new ChromePdfRenderer() |
doc.AddImageUrl(url) | renderer.RenderUrlAsPdf(url) |
doc.AddImageHtml(html) | renderer.RenderHtmlAsPdf(html) |
doc.AddImageUrl("file:///" + path) | renderer.RenderHtmlFileAsPdf(path) |
doc.AddImageFile(path) (image files) | ImageToPdfConverter.ImageToPdf(path) |
doc.Read(path) | PdfDocument.FromFile(path) |
doc.Save(path) | pdf.SaveAs(path) |
doc.GetData() | pdf.BinaryData |
doc.Clear() | Use using statement |
Page Manipulation Methods
| ABCpdf Method | IronPDF Method |
|---|---|
doc.PageCount | pdf.PageCount |
doc.PageNumber = n | pdf.Pages[n-1] |
doc.Delete(pageId) | pdf.RemovePages(index) |
doc.Append(otherDoc) | PdfDocument.Merge(pdf1, pdf2) |
doc.Rect.Inset(x, y) | RenderingOptions.MarginTop/Bottom/Left/Right |
Security and Encryption Methods
| ABCpdf Method | IronPDF Method |
|---|---|
doc.Encryption.OwnerPassword | pdf.SecuritySettings.OwnerPassword |
doc.Encryption.Password (user password) | pdf.SecuritySettings.UserPassword |
doc.Encryption.CanPrint | pdf.SecuritySettings.AllowUserPrinting |
doc.Encryption.CanCopy | pdf.SecuritySettings.AllowUserCopyPasteContent |
doc.SetInfo(-1, "/Info*/Title:Text", value) | pdf.MetaData.Title |
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.ABCpdf14;
using WebSupergoo.ABCpdf14.Objects;
class Program
{
static void Main()
{
Doc doc = new Doc();
doc.HtmlOptions.Engine = EngineType.Chrome146;
doc.AddImageUrl("https://www.example.com");
doc.Save("output.pdf");
doc.Clear();
}
}
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");
}
}Imports System
Imports IronPdf
Class Program
Shared Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://www.example.com")
pdf.SaveAs("output.pdf")
End Sub
End ClassOne behavioural difference matters more than the line count: AddImageUrl() draws only the first page of the rendered result, and further pages are pulled in by chaining AddImageToChain(). RenderUrlAsPdf() paginates the whole document in a single call.
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.ABCpdf14;
using WebSupergoo.ABCpdf14.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.Chrome146;
doc.AddImageHtml(html);
doc.Save("output.pdf");
doc.Clear();
}
}
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");
}
}Imports System
Imports IronPdf
Module Program
Sub Main()
Dim html As String = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>"
Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("output.pdf")
End Sub
End ModuleThe IronPDF version requires fewer lines of code and produces consistent output across 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.ABCpdf14;
using WebSupergoo.ABCpdf14.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();
}
}
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
Imports System
Imports System.Collections.Generic
Imports IronPdf
Module Program
Sub Main()
Dim pdf1 = PdfDocument.FromFile("document1.pdf")
Dim pdf2 = PdfDocument.FromFile("document2.pdf")
Dim merged = PdfDocument.Merge(pdf1, pdf2)
merged.SaveAs("merged.pdf")
End Sub
End ModuleThe merge semantics differ: doc1.Append(doc2) adds the second document to the end of the first, while IronPDF's static Merge returns a new document.
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.ABCpdf14;
using WebSupergoo.ABCpdf14.Objects;
public byte[] GeneratePdf(string html)
{
Doc doc = new Doc();
doc.HtmlOptions.Engine = EngineType.Chrome146;
doc.Rect.Inset(20, 20);
doc.AddImageHtml(html);
byte[] data = doc.GetData();
doc.Clear(); // or wrap the Doc in a using block
return data;
}
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'
}Imports IronPdf
Public Function GeneratePdf(html As String) As Byte()
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.MarginTop = 20
renderer.RenderingOptions.MarginBottom = 20
renderer.RenderingOptions.MarginLeft = 20
renderer.RenderingOptions.MarginRight = 20
Using pdf = renderer.RenderHtmlAsPdf(html)
Return pdf.BinaryData ' Automatic cleanup with 'Using'
End Using
End FunctionAdvanced Migration Scenarios
ASP.NET Core Web Application
For teams building web applications with .NET 6+, here's the recommended pattern:
ABCpdf Pattern:
[HttpPost]
public IActionResult GeneratePdf([FromBody] ReportRequest request)
{
Doc doc = new Doc();
doc.HtmlOptions.Engine = EngineType.Chrome146;
doc.AddImageHtml(request.Html);
byte[] pdfBytes = doc.GetData();
doc.Clear();
return File(pdfBytes, "application/pdf", "report.pdf");
}
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 Function GeneratePdf(<FromBody> request As ReportRequest) As IActionResult
Dim renderer As New ChromePdfRenderer()
Using pdf = renderer.RenderHtmlAsPdf(request.Html)
Return File(pdf.BinaryData, "application/pdf", "report.pdf")
End Using
End FunctionAsync PDF Generation
ABCpdf's Doc API is synchronous: the class reference exposes no Task-based methods. 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;
}Imports IronPdf
Public Async Function GeneratePdfAsync(html As String) As Task(Of Byte())
Dim renderer As New ChromePdfRenderer()
Using pdf = Await renderer.RenderHtmlAsPdfAsync(html)
Return pdf.BinaryData
End Using
End FunctionDependency Injection Setup
Register IronPDF in modern .NET applications using current C# patterns:
// 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>();Imports Microsoft.Extensions.DependencyInjection
Imports System.Threading.Tasks
' Program.vb (.NET 6+)
builder.Services.AddSingleton(Of ChromePdfRenderer)()
' Or create a service wrapper
Public Interface IPdfService
Function GeneratePdfAsync(html As String) As Task(Of Byte())
End Interface
Public Class IronPdfService
Implements IPdfService
Private ReadOnly _renderer As ChromePdfRenderer
Public Sub New()
_renderer = New ChromePdfRenderer()
_renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
End Sub
Public Async Function GeneratePdfAsync(html As String) As Task(Of Byte()) Implements IPdfService.GeneratePdfAsync
Using pdf = Await _renderer.RenderHtmlAsPdfAsync(html)
Return pdf.BinaryData
End Using
End Function
End Class
' Register: builder.Services.AddSingleton(Of IPdfService, IronPdfService)()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");
}Imports System
' Good: Single renderer instance
Dim renderer As New ChromePdfRenderer()
For Each html In htmlList
Using pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs($"output_{i}.pdf")
End Using
Next
' Bad: New renderer each time (slower startup)
For Each html In htmlList
Dim renderer As New ChromePdfRenderer() ' Overhead!
Using pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs($"output_{i}.pdf")
End Using
NextTroubleshooting 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");Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.WaitFor.RenderDelay(2000) ' Wait 2 seconds
' Or wait for specific element:
renderer.RenderingOptions.WaitFor.HtmlElementById("content-loaded")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
};
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
usingstatements - Convert
Docinstantiation toChromePdfRenderer - Replace
doc.Clear()calls withusingstatements on the IronPDFPdfDocument - 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 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.