IRONSOFTWAREHOME
MIGRATION GUIDES

How to Migrate from HiQPdf to IronPDF in C#

Curtis Chau
Curtis Chau
Updated: August 1, 2026

HiQPdf is a commercial HTML-to-PDF library published by HiQPdf Software (current HiQPdf 18.0.2 on nuget.org, February 2026). Common reasons developers evaluate alternatives:

  1. Restrictive Free Version: HiQPdf.Free caps output at 3 pages per document - useful for evaluation, not production workloads requiring complete document generation.
  2. WebKit on the Classic Line: The Classic HiQPdf package uses an older WebKit-based engine that can struggle with modern JavaScript frameworks. HiQPdf does ship a Chromium-based variant (HiQPdf.NG / HiQPdf.Chromium.Windows, plus a Linux build), but most existing code targets the Classic engine.
  3. .NET Support Spread Across Packages: .NET Framework, .NET Core, and .NET Standard 2.0 are all supported, but split across separate NuGet IDs (HiQPdf, HiQPdf_NetCore, HiQPdf.NG, HiQPdf.Chromium.Windows, HiQPdf_x64) you have to pick between.
  4. Fragmented Packages: Multiple NuGet IDs for different platforms (HiQPdf, HiQPdf.Free, HiQPdf_NetCore, HiQPdf.NG, HiQPdf.Chromium.Windows) complicate dependency management.
  5. Verbose Configuration: Requires setup through Document, Header, Footer property chains rather than a fluent rendering-options API.
  6. Per-Developer Licensing Adds Up: $245 Startup / $495 Developer / $795 Team / $1,095 Enterprise (perpetual, first year of updates included).

HiQPdf vs IronPDF Comparison

AspectHiQPdfIronPDF
Rendering EngineWebKit (Classic HiQPdf) or Chromium (HiQPdf.NG / HiQPdf.Chromium.Windows)Modern Chromium
Free TierHiQPdf.Free 3-page limit30-day full trial
Modern JS SupportLimited on Classic; modern on NG/ChromiumFull (React, Angular, Vue)
.NET Core/5+ SupportSupported, but split across multiple NuGet packagesSingle unified package
API DesignProperty chainsFluent rendering options
CSS3 SupportPartial on Classic; full on NGFull support
DocumentationFragmented across product linesComprehensive
NuGet PackageMultiple variantsSingle package

IronPDF documents support for current .NET versions (.NET Framework 4.6.2+, .NET 6, 7, 8, 9) on a modern Chromium rendering engine.


Migration Complexity Assessment

Estimated Effort by Feature

FeatureMigration Complexity
HTML to PDFVery Low
URL to PDFVery Low
Merge PDFsLow
Headers/FootersMedium
Page Size/MarginsLow
TriggerMode/DelaysLow

Paradigm Shift

The fundamental shift in this HiQPdf migration is from property chain configuration to fluent rendering options:

HiQPdf:   converter.Document.Header.Height = 50;
          converter.Document.Header.Add(new HtmlToPdfVariableElement(...));
          
IronPDF:  renderer.RenderingOptions.TextHeader = new TextHeaderFooter() { ... };
Text

Before You Start

Prerequisites

  1. .NET Version: IronPDF supports .NET Framework 4.6.2+ and .NET Core 3.1+ / .NET 5+
  2. License Key: Obtain your IronPDF license key from ironpdf.com
  3. Remove HiQPdf: Plan to remove all HiQPdf NuGet package variants

Identify All HiQPdf Usage

# Find HiQPdf namespace usage
grep -r "using HiQPdf\|HtmlToPdf\|PdfDocument" --include="*.cs" .

# Find header/footer usage
grep -r "\.Header\.\|\.Footer\.\|HtmlToPdfVariableElement" --include="*.cs" .

# Find placeholder syntax
grep -r "CrtPage\|PageCount" --include="*.cs" .

# Find NuGet references
grep -r "HiQPdf" --include="*.csproj" .
SHELL

NuGet Package Changes

# Remove all HiQPdf variants
dotnet remove package HiQPdf
dotnet remove package HiQPdf.Free
dotnet remove package HiQPdf_NetCore
dotnet remove package HiQPdf_x64
dotnet remove package HiQPdf.NG
dotnet remove package HiQPdf.Chromium.Windows

# Install IronPDF (single package for all platforms)
dotnet add package IronPdf
SHELL

Quick Start Migration

Step 1: Update License Configuration

Before (HiQPdf):

HtmlToPdf converter = new HtmlToPdf();
converter.SerialNumber = "HIQPDF-SERIAL-NUMBER";

After (IronPDF):

// Set globally at application startup
IronPdf.License.LicenseKey = "YOUR-IRONPDF-LICENSE-KEY";

Step 2: Update Namespace Imports

// Before (HiQPdf)
using HiQPdf;

// After (IronPDF)
using IronPdf;
using IronPdf.Rendering;

Complete API Reference

Main Class Mapping

HiQPdf ClassIronPDF Class
HtmlToPdfChromePdfRenderer
PdfDocumentPdfDocument
HtmlToPdfVariableElementTextHeaderFooter or HtmlHeaderFooter

Conversion Method Mapping

HiQPdf MethodIronPDF Method
ConvertHtmlToMemory(html, baseUrl)RenderHtmlAsPdf(html)
ConvertUrlToMemory(url)RenderUrlAsPdf(url)
File.WriteAllBytes(path, bytes)pdf.SaveAs(path)

PDF Document Method Mapping

HiQPdf MethodIronPDF Method
PdfDocument.FromFile(path)PdfDocument.FromFile(path)
document1.AddDocument(document2)PdfDocument.Merge(pdf1, pdf2)
document.WriteToFile(path)pdf.SaveAs(path)

Header/Footer Placeholder Mapping

HiQPdf PlaceholderIronPDF PlaceholderDescription
{CrtPage}{page}Current page number
{PageCount}{total-pages}Total page count

Code Migration Examples

Example 1: HTML to PDF Conversion

Before (HiQPdf):

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

class Program
{
    static void Main()
    {
        HtmlToPdf htmlToPdfConverter = new HtmlToPdf();
        byte[] pdfBuffer = htmlToPdfConverter.ConvertUrlToMemory("https://example.com");
        System.IO.File.WriteAllBytes("output.pdf", pdfBuffer);
        
        // Convert HTML string
        string html = "<h1>Hello World</h1><p>This is a PDF document.</p>";
        byte[] pdfFromHtml = htmlToPdfConverter.ConvertHtmlToMemory(html, "");
        System.IO.File.WriteAllBytes("fromhtml.pdf", pdfFromHtml);
    }
}

After (IronPDF):

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

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("output.pdf");
        
        // Convert HTML string
        string html = "<h1>Hello World</h1><p>This is a PDF document.</p>";
        var pdfFromHtml = renderer.RenderHtmlAsPdf(html);
        pdfFromHtml.SaveAs("fromhtml.pdf");
    }
}

The HiQPdf approach requires creating an HtmlToPdf instance, calling ConvertUrlToMemory() or ConvertHtmlToMemory() to get a byte array, then manually writing bytes to a file. IronPDF's ChromePdfRenderer returns a PdfDocument object with a direct SaveAs() method, eliminating the manual file writing step. The modern Chromium engine also provides better rendering for complex HTML/CSS/JavaScript content. See the HTML to PDF documentation for additional rendering options.

Example 2: Merge Multiple PDFs

Before (HiQPdf):

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

class Program
{
    static void Main()
    {
        // Create first PDF
        HtmlToPdf converter1 = new HtmlToPdf();
        byte[] pdf1 = converter1.ConvertHtmlToMemory("<h1>First Document</h1>", "");
        System.IO.File.WriteAllBytes("doc1.pdf", pdf1);
        
        // Create second PDF
        HtmlToPdf converter2 = new HtmlToPdf();
        byte[] pdf2 = converter2.ConvertHtmlToMemory("<h1>Second Document</h1>", "");
        System.IO.File.WriteAllBytes("doc2.pdf", pdf2);
        
        // Merge PDFs
        PdfDocument document1 = PdfDocument.FromFile("doc1.pdf");
        PdfDocument document2 = PdfDocument.FromFile("doc2.pdf");
        document1.AddDocument(document2);
        document1.WriteToFile("merged.pdf");
    }
}

After (IronPDF):

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

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        
        // Create first PDF
        var pdf1 = renderer.RenderHtmlAsPdf("<h1>First Document</h1>");
        pdf1.SaveAs("doc1.pdf");
        
        // Create second PDF
        var pdf2 = renderer.RenderHtmlAsPdf("<h1>Second Document</h1>");
        pdf2.SaveAs("doc2.pdf");
        
        // Merge PDFs
        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");
    }
}

The HiQPdf approach requires loading documents from files using PdfDocument.FromFile(), calling AddDocument() on the first document to append the second, then using WriteToFile() to save. IronPDF provides a cleaner static PdfDocument.Merge() method that accepts multiple PdfDocument objects directly - no intermediate file operations required. Learn more about merging and splitting PDFs.

Example 3: PDF Headers and Footers with Page Numbers

Before (HiQPdf):

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

class Program
{
    static void Main()
    {
        HtmlToPdf htmlToPdfConverter = new HtmlToPdf();
        
        // Add header
        htmlToPdfConverter.Document.Header.Height = 50;
        HtmlToPdfVariableElement headerHtml = new HtmlToPdfVariableElement("<div style='text-align:center'>Page Header</div>", "");
        htmlToPdfConverter.Document.Header.Add(headerHtml);
        
        // Add footer with page number
        htmlToPdfConverter.Document.Footer.Height = 50;
        HtmlToPdfVariableElement footerHtml = new HtmlToPdfVariableElement("<div style='text-align:center'>Page {CrtPage} of {PageCount}</div>", "");
        htmlToPdfConverter.Document.Footer.Add(footerHtml);
        
        byte[] pdfBuffer = htmlToPdfConverter.ConvertHtmlToMemory("<h1>Document with Headers and Footers</h1>", "");
        System.IO.File.WriteAllBytes("header-footer.pdf", pdfBuffer);
    }
}

After (IronPDF):

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

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        
        // Configure header and footer
        renderer.RenderingOptions.TextHeader = new TextHeaderFooter()
        {
            CenterText = "Page Header",
            FontSize = 12
        };
        
        renderer.RenderingOptions.TextFooter = new TextHeaderFooter()
        {
            CenterText = "Page {page} of {total-pages}",
            FontSize = 10
        };
        
        var pdf = renderer.RenderHtmlAsPdf("<h1>Document with Headers and Footers</h1>");
        pdf.SaveAs("header-footer.pdf");
    }
}

The HiQPdf approach requires setting Document.Header.Height, creating HtmlToPdfVariableElement objects, and calling Add() on the header/footer sections. Page number placeholders use {CrtPage} and {PageCount} syntax. IronPDF provides a cleaner TextHeaderFooter configuration with CenterText properties and different placeholder syntax: {page} and {total-pages}. See the headers and footers documentation for additional options including HTML-based headers.


Critical Migration Notes

Placeholder Syntax Change

The most important change for documents with page numbers is the placeholder syntax:

// HiQPdf placeholders
"Page {CrtPage} of {PageCount}"

// IronPDF placeholders
"Page {page} of {total-pages}"

Complete placeholder mapping:

  • {CrtPage}{page}
  • {PageCount}{total-pages}

Merge Method Difference

HiQPdf modifies the first document in place:

// HiQPdf: Modifies document1
document1.AddDocument(document2);
document1.WriteToFile("merged.pdf");

IronPDF returns a new merged document:

// IronPDF: Returns new document
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");

No 3-Page Limit

HiQPdf's free version caps output at 3 pages with watermarks. IronPDF generates complete documents without artificial limitations during the trial period.

Reuse ChromePdfRenderer

Unlike HiQPdf where you might create new HtmlToPdf instances for each conversion, IronPDF's ChromePdfRenderer should be reused:

// IronPDF: Create once, reuse
var renderer = new ChromePdfRenderer();
var pdf1 = renderer.RenderHtmlAsPdf(html1);
var pdf2 = renderer.RenderHtmlAsPdf(html2);

Troubleshooting

Issue 1: HtmlToPdf Not Found

Problem: HtmlToPdf class doesn't exist in IronPDF.

Solution: Replace with ChromePdfRenderer:

// HiQPdf
HtmlToPdf htmlToPdfConverter = new HtmlToPdf();

// IronPDF
var renderer = new ChromePdfRenderer();

Issue 2: ConvertHtmlToMemory Not Found

Problem: ConvertHtmlToMemory() method doesn't exist.

Solution: Use RenderHtmlAsPdf():

// HiQPdf
byte[] pdfBytes = converter.ConvertHtmlToMemory(html, "");

// IronPDF
var pdf = renderer.RenderHtmlAsPdf(html);
byte[] pdfBytes = pdf.BinaryData;

Issue 3: Page Number Placeholders Not Working

Problem: {CrtPage} and {PageCount} appear literally in output.

Solution: Update to IronPDF placeholder syntax:

// HiQPdf syntax (won't work)
"Page {CrtPage} of {PageCount}"

// IronPDF syntax
"Page {page} of {total-pages}"

Issue 4: HtmlToPdfVariableElement Not Found

Problem: HtmlToPdfVariableElement class doesn't exist.

Solution: Use TextHeaderFooter or HtmlHeaderFooter:

// HiQPdf
HtmlToPdfVariableElement headerHtml = new HtmlToPdfVariableElement("<div>Header</div>", "");
converter.Document.Header.Add(headerHtml);

// IronPDF
renderer.RenderingOptions.TextHeader = new TextHeaderFooter()
{
    CenterText = "Header",
    FontSize = 12
};

Migration Checklist

Pre-Migration

  • Inventory all HiQPdf API calls in codebase
  • Document current page sizes, margins, and settings
  • Identify header/footer configurations and placeholders
  • Obtain IronPDF license key
  • Test IronPDF in development environment

Code Migration

  • Remove all HiQPdf NuGet packages (all variants)
  • Install IronPDF NuGet package: dotnet add package IronPdf
  • Update namespace imports
  • Replace HtmlToPdf with ChromePdfRenderer
  • Convert ConvertHtmlToMemory() to RenderHtmlAsPdf()
  • Convert ConvertUrlToMemory() to RenderUrlAsPdf()
  • Update header/footer placeholders ({CrtPage}{page}, {PageCount}{total-pages})
  • Replace HtmlToPdfVariableElement with TextHeaderFooter
  • Update merge operations (AddDocumentPdfDocument.Merge)
  • Add license key initialization at startup

Testing

  • Test HTML to PDF conversion
  • Test URL to PDF conversion
  • Verify header/footer rendering
  • Verify page number placeholders
  • Test PDF merging
  • Test JavaScript-heavy pages (now supported with Chromium)

Post-Migration

  • Remove HiQPdf serial number from configuration
  • Update documentation
  • Monitor for any rendering differences

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