IronPDF vs PDFTron (Apryse): The Complete C# PDF Library Comparison for 2025
Looking for the right PDF library for your .NET project? This comprehensive comparison between IronPDF and PDFTron (now Apryse) analyzes features, pricing, performance, and developer experience to help you make an informed decision. Whether you're building web applications, desktop software, or cloud services, choosing the right PDF toolkit can significantly impact your development speed and project success.
Quick Comparison Summary
Category | Feature/Aspect | IronPDF | PDFTron (Apryse) | Key Advantage |
---|---|---|---|---|
Core Architecture | Design Philosophy | Simplicity-first, Chrome V8 engine | Enterprise-focused, custom engine | IronPDF: Faster development |
API Complexity | Simple methods like RenderHtmlAsPdf() | Multi-class approach, granular control | IronPDF: 70% less code | |
Learning Curve | 1-2 days typical | 1-2 weeks typical | IronPDF: Quicker adoption | |
Platform Support | Cross-Platform | Native support, single package | Multiple packages/modules required | IronPDF: Simpler deployment |
.NET Versions | .NET 9, 8, 7, 6, 5, Core 3.1+, Framework 4.6.2+ | Similar support with additional setup | Both: Modern framework support | |
HTML to PDF | Rendering Engine | Full Chrome V8 engine | Custom engine (via HTML2PDF module) | IronPDF: 98%+ browser fidelity |
JavaScript Support | Full support with render delays | Limited support | IronPDF: Dynamic content ready | |
MS Office Support | DOCX to PDF | Built-in DocxToPdfRenderer | Native Office conversion support | PDFTron: Better Office fidelity |
CAD Support | Not available | DWG, DXF, DGN to PDF | PDFTron: CAD workflows | |
Performance | HTML Rendering Speed | 0.8-1.2s typical (Chrome engine) | 0.3-0.5s typical (simple HTML) | PDFTron: Faster for basic HTML |
Memory Usage | 150-200MB (Chrome process) | 80-120MB typical | PDFTron: Lower memory footprint | |
Licensing & Pricing | Entry Level | Lite: $749 (1 dev, 1 project) | Custom quote (est. $5,000-$10,000+) | IronPDF: Transparent pricing |
Enterprise | Professional: $2,999 (10 devs) | Custom quote (est. $30,000+) | IronPDF: Up to 90% cost savings | |
Support | Support Included | Yes, 24/5 engineering support | Varies by license tier | IronPDF: Support included |
Best For | Use Cases | Modern web apps, HTML reports, rapid development | Document-heavy workflows, CAD/Office conversion | Context-dependent |
What Are IronPDF and PDFTron (Apryse)?
IronPDF Overview
IronPDF is a comprehensive .NET PDF library that simplifies PDF creation, editing, and manipulation for developers. Built on a Chrome rendering engine, it excels at converting HTML, CSS, and JavaScript into pixel-perfect PDF documents. The library's straightforward API design allows developers to integrate PDF functionality with minimal code, making it ideal for web applications, reporting systems, and document automation.
PDFTron (Apryse) Overview
PDFTron, rebranded as Apryse in February 2023, is an enterprise-focused PDF SDK that provides extensive document processing capabilities. Originally developed for complex document workflows, it offers robust support for various file formats including Microsoft Office, CAD drawings, and specialized document types. PDFTron Systems Inc., a global leader in document processing technology, announced its rebranding as Apryse; bringing 13 companies including iText, Windward, Eversign, and more together.
How Do I Create an ASP.NET Project for PDF Generation?
Setting up an ASP.NET project for PDF generation requires proper configuration regardless of which library you choose. Follow these steps to create a foundation for either IronPDF or PDFTron integration:
- Open Visual Studio 2022 or later
- Click "Create a new project"
- Select "ASP.NET Core Web App" (.NET 6.0 or later recommended)
- Choose your project name and location
- Select "Web Application (Model-View-Controller)" or "Web API" based on your needs
- Ensure ".NET 8.0" or later is selected for optimal compatibility
Visual Studio's New Project dialog box displaying ASP.NET project templates for PDF library integration
For Web Forms applications:
- Select "ASP.NET Web Application (.NET Framework)"
- Choose "Web Forms" from the template options
- Click "Create" to generate the project structure
Selecting Web Forms template for traditional ASP.NET applications with PDF capabilities
How Do I Install IronPDF in My C# Project?
IronPDF offers multiple installation methods to suit different development workflows. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage NuGet Packages...". From there, simply search for IronPDF and install the latest version.
Method 1: Using Visual Studio Package Manager
The most straightforward approach uses Visual Studio's built-in NuGet Package Manager:
- Right-click your project in Solution Explorer
- Select "Manage NuGet Packages"
- Click "Browse" and search for "IronPDF"
- Click "Install" on the IronPDF package
Accessing NuGet Package Manager through Visual Studio's Solution Explorer for IronPDF installation
Alternative access to NuGet Package Manager via Visual Studio's Project menu
Installing IronPDF through NuGet Package Manager with version information and dependencies
Method 2: Using Package Manager Console
For developers who prefer command-line tools:
# Open Package Manager Console in Visual Studio
# Tools > NuGet Package Manager > Package Manager Console
Install-Package IronPdf
# For specific version installation
Install-Package IronPdf -Version 2025.7.0
# Open Package Manager Console in Visual Studio
# Tools > NuGet Package Manager > Package Manager Console
Install-Package IronPdf
# For specific version installation
Install-Package IronPdf -Version 2025.7.0
Method 3: Direct Download Installation
For environments without NuGet access:
- Download from IronPDF's official site
- Extract the ZIP file to your project directory
- In Visual Studio, right-click "References" → "Add Reference"
- Browse to and select
IronPdf.dll
Method 4: Using .NET CLI
For command-line enthusiasts and CI/CD pipelines:
# Navigate to your project directory
cd MyProject
# Install IronPDF
dotnet add package IronPdf
# Restore packages
dotnet restore
# Navigate to your project directory
cd MyProject
# Install IronPDF
dotnet add package IronPdf
# Restore packages
dotnet restore
How Do I Install PDFTron (Apryse) SDK?
PDFTron installation involves more steps due to its modular architecture and enterprise focus. The process varies depending on your target platform and required features.
Prerequisites
- Visual Studio 2019 or later
- .NET Desktop Development workload
- .NET Framework 4.5.1+ development tools
- PDFTron SDK download
Manual Integration Steps
Extract the SDK
# Example extraction path PDFNET_BASE = C:/PDFTron/PDFNetDotNet4/
# Example extraction path PDFNET_BASE = C:/PDFTron/PDFNetDotNet4/
SHELLInitialize with License Key
// Initialize PDFTron with your license key pdftron.PDFNet.Initialize("your-license-key-here"); // Note: Demo keys expire after evaluation period // Contact Apryse sales for production licenses
// Initialize PDFTron with your license key pdftron.PDFNet.Initialize("your-license-key-here"); // Note: Demo keys expire after evaluation period // Contact Apryse sales for production licenses
' Initialize PDFTron with your license key pdftron.PDFNet.Initialize("your-license-key-here") ' Note: Demo keys expire after evaluation period ' Contact Apryse sales for production licenses
$vbLabelText $csharpLabelCopy Required Libraries
- Copy the
Lib
folder fromPDFNET_BASE
to your project directory - Add references to both
PDFNetLoader.dll
and platform-specificPDFNet.dll
- Copy the
- Configure Copy Local Property
Setting PDFNet.dll's Copy Local property to False for proper PDFTron deployment
Update App.config
<configuration> <runtime> <loadFromRemoteSources enabled="true" /> </runtime> </configuration>
<configuration> <runtime> <loadFromRemoteSources enabled="true" /> </runtime> </configuration>
XMLConfigure Post-Build Events
xcopy $(ProjectDir)Lib\PDFNet $(TargetDir)PDFNet /S /I /Y
xcopy $(ProjectDir)Lib\PDFNet $(TargetDir)PDFNet /S /I /Y
SHELL
NuGet Installation (Simplified)
For a more streamlined approach:
- Open NuGet Package Manager
- Search for "PDFTron.NET.x64" or platform-specific package
- Install the appropriate package for your architecture
Installing PDFTron through NuGet Package Manager with platform-specific packages
PDFTron offers a wider variety of over 30 annotation types compared to ComPDFKit's 10+ types. However, this extensive feature set requires careful module selection during installation.
How Do I Convert a URL to PDF Using These Libraries?
Both libraries provide URL to PDF conversion, but with different approaches and capabilities. Let's examine the implementation details and performance characteristics of each.
URL to PDF with IronPDF
IronPDF's Chrome rendering engine provides exceptional support for modern web standards:
using IronPdf;
// Initialize the Chrome renderer with advanced options
var renderer = new ChromePdfRenderer();
// Configure rendering for optimal results
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 1000; // Wait for JS execution
// Handle authentication if needed
renderer.LoginCredentials = new ChromeHttpLoginCredentials() {
Username = "user@domain.com",
Password = "secure_password"
};
// Render URL to PDF with full browser capabilities
var pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Add metadata for document management
pdf.MetaData.Author = "Development Team";
pdf.MetaData.Title = "Website Export - " + DateTime.Now.ToString("yyyy-MM-dd");
// Save with compression
pdf.CompressImages(90);
pdf.SaveAs("website-export.pdf");
using IronPdf;
// Initialize the Chrome renderer with advanced options
var renderer = new ChromePdfRenderer();
// Configure rendering for optimal results
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 1000; // Wait for JS execution
// Handle authentication if needed
renderer.LoginCredentials = new ChromeHttpLoginCredentials() {
Username = "user@domain.com",
Password = "secure_password"
};
// Render URL to PDF with full browser capabilities
var pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/");
// Add metadata for document management
pdf.MetaData.Author = "Development Team";
pdf.MetaData.Title = "Website Export - " + DateTime.Now.ToString("yyyy-MM-dd");
// Save with compression
pdf.CompressImages(90);
pdf.SaveAs("website-export.pdf");
Imports IronPdf
' Initialize the Chrome renderer with advanced options
Private renderer = New ChromePdfRenderer()
' Configure rendering for optimal results
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
renderer.RenderingOptions.MarginTop = 20
renderer.RenderingOptions.MarginBottom = 20
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print
renderer.RenderingOptions.EnableJavaScript = True
renderer.RenderingOptions.RenderDelay = 1000 ' Wait for JS execution
' Handle authentication if needed
renderer.LoginCredentials = New ChromeHttpLoginCredentials() With {
.Username = "user@domain.com",
.Password = "secure_password"
}
' Render URL to PDF with full browser capabilities
Dim pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/")
' Add metadata for document management
pdf.MetaData.Author = "Development Team"
pdf.MetaData.Title = "Website Export - " & DateTime.Now.ToString("yyyy-MM-dd")
' Save with compression
pdf.CompressImages(90)
pdf.SaveAs("website-export.pdf")
The Chrome renderer in IronPDF handles complex scenarios including:
- Single Page Applications (SPAs) with heavy JavaScript
- Responsive designs with media queries
- Web fonts and external stylesheets
- AJAX content loading
- CSS animations and transitions
IronPDF main branch now supports all of this: nuget.org/packages/IronPdf. Recent performance improvements have significantly enhanced rendering speed, especially for complex web applications.
URL to PDF with PDFTron (Apryse)
PDFTron requires the HTML2PDF module for web content conversion:
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class UrlToPdfConverter
{
public static void ConvertUrlToPdf(string url, string outputPath)
{
// Initialize PDFTron with license
PDFNet.Initialize("your-license-key");
// Create a new PDF document
using (PDFDoc doc = new PDFDoc())
{
// Initialize HTML2PDF converter
HTML2PDF converter = new HTML2PDF();
// Configure conversion settings
HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
settings.SetPrintBackground(true);
settings.SetLoadImages(true);
// Set page dimensions
converter.SetPaperSize(PrinterMode.PaperSize.e_letter);
converter.SetMargins(0.5, 0.5, 0.5, 0.5);
// Insert URL content
converter.InsertFromURL(url);
// Perform conversion
if (converter.Convert(doc))
{
// Save the resulting PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
Console.WriteLine($"Successfully converted {url} to {outputPath}");
}
else
{
Console.WriteLine("Conversion failed");
}
}
}
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class UrlToPdfConverter
{
public static void ConvertUrlToPdf(string url, string outputPath)
{
// Initialize PDFTron with license
PDFNet.Initialize("your-license-key");
// Create a new PDF document
using (PDFDoc doc = new PDFDoc())
{
// Initialize HTML2PDF converter
HTML2PDF converter = new HTML2PDF();
// Configure conversion settings
HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
settings.SetPrintBackground(true);
settings.SetLoadImages(true);
// Set page dimensions
converter.SetPaperSize(PrinterMode.PaperSize.e_letter);
converter.SetMargins(0.5, 0.5, 0.5, 0.5);
// Insert URL content
converter.InsertFromURL(url);
// Perform conversion
if (converter.Convert(doc))
{
// Save the resulting PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
Console.WriteLine($"Successfully converted {url} to {outputPath}");
}
else
{
Console.WriteLine("Conversion failed");
}
}
}
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class UrlToPdfConverter
Public Shared Sub ConvertUrlToPdf(ByVal url As String, ByVal outputPath As String)
' Initialize PDFTron with license
PDFNet.Initialize("your-license-key")
' Create a new PDF document
Using doc As New PDFDoc()
' Initialize HTML2PDF converter
Dim converter As New HTML2PDF()
' Configure conversion settings
Dim settings As New HTML2PDF.WebPageSettings()
settings.SetPrintBackground(True)
settings.SetLoadImages(True)
' Set page dimensions
converter.SetPaperSize(PrinterMode.PaperSize.e_letter)
converter.SetMargins(0.5, 0.5, 0.5, 0.5)
' Insert URL content
converter.InsertFromURL(url)
' Perform conversion
If converter.Convert(doc) Then
' Save the resulting PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized)
Console.WriteLine($"Successfully converted {url} to {outputPath}")
Else
Console.WriteLine("Conversion failed")
End If
End Using
End Sub
End Class
Important considerations for PDFTron HTML2PDF:
- PDFTron's SDK is quoted based on the breadth of technology (APIs, features) and the distribution scope (external or internal users).
- Limited JavaScript support compared to browser engines
- May require additional configuration for complex layouts
- Better suited for simpler HTML documents
How Do I Create PDFs from HTML Strings?
Creating PDFs from HTML strings is essential for generating dynamic reports, invoices, and documents. Both libraries handle this differently.
HTML String to PDF with IronPDF
IronPDF excels at rendering complex HTML with full CSS3 and JavaScript support:
using IronPdf;
using System.Text;
public class HtmlStringToPdfConverter
{
public static PdfDocument GenerateInvoice(InvoiceData data)
{
// Build dynamic HTML with modern CSS
var html = new StringBuilder();
html.Append(@"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 20px;
color: #333;
}
.invoice-header {
display: flex;
justify-content: space-between;
border-bottom: 2px solid #007bff;
padding-bottom: 20px;
margin-bottom: 30px;
}
.company-logo {
width: 150px;
height: auto;
}
.invoice-details {
text-align: right;
}
.invoice-number {
font-size: 24px;
font-weight: 700;
color: #007bff;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th {
background-color: #f8f9fa;
padding: 12px;
text-align: left;
border-bottom: 2px solid #dee2e6;
}
td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
}
.total-row {
font-weight: 700;
font-size: 18px;
background-color: #e9ecef;
}
@media print {
body { margin: 0; }
.no-print { display: none; }
}
</style>
</head>
<body>
");
// Add invoice header
html.Append($@"
<div class='invoice-header'>
<div>
<img src='data:image/png;base64,{data.CompanyLogoBase64}' class='company-logo' alt='Company Logo'>
<h2>{data.CompanyName}</h2>
<p>{data.CompanyAddress}</p>
</div>
<div class='invoice-details'>
<div class='invoice-number'>Invoice #{data.InvoiceNumber}</div>
<p>Date: {data.InvoiceDate:yyyy-MM-dd}</p>
<p>Due: {data.DueDate:yyyy-MM-dd}</p>
</div>
</div>
");
// Add line items table
html.Append(@"
<table>
<thead>
<tr>
<th>Description</th>
<th>Quantity</th>
<th>Unit Price</th>
<th>Total</th>
</tr>
</thead>
<tbody>
");
foreach (var item in data.LineItems)
{
html.Append($@"
<tr>
<td>{item.Description}</td>
<td>{item.Quantity}</td>
<td>${item.UnitPrice:F2}</td>
<td>${item.Total:F2}</td>
</tr>
");
}
html.Append($@"
</tbody>
<tfoot>
<tr class='total-row'>
<td colspan='3'>Total</td>
<td>${data.Total:F2}</td>
</tr>
</tfoot>
</table>
</body>
</html>
");
// Configure renderer for optimal output
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
// Generate PDF with proper base path for assets
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
// Add security if needed
pdf.SecuritySettings.UserPassword = data.CustomerEmail;
pdf.SecuritySettings.AllowUserPrinting = true;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
return pdf;
}
}
using IronPdf;
using System.Text;
public class HtmlStringToPdfConverter
{
public static PdfDocument GenerateInvoice(InvoiceData data)
{
// Build dynamic HTML with modern CSS
var html = new StringBuilder();
html.Append(@"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 20px;
color: #333;
}
.invoice-header {
display: flex;
justify-content: space-between;
border-bottom: 2px solid #007bff;
padding-bottom: 20px;
margin-bottom: 30px;
}
.company-logo {
width: 150px;
height: auto;
}
.invoice-details {
text-align: right;
}
.invoice-number {
font-size: 24px;
font-weight: 700;
color: #007bff;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th {
background-color: #f8f9fa;
padding: 12px;
text-align: left;
border-bottom: 2px solid #dee2e6;
}
td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
}
.total-row {
font-weight: 700;
font-size: 18px;
background-color: #e9ecef;
}
@media print {
body { margin: 0; }
.no-print { display: none; }
}
</style>
</head>
<body>
");
// Add invoice header
html.Append($@"
<div class='invoice-header'>
<div>
<img src='data:image/png;base64,{data.CompanyLogoBase64}' class='company-logo' alt='Company Logo'>
<h2>{data.CompanyName}</h2>
<p>{data.CompanyAddress}</p>
</div>
<div class='invoice-details'>
<div class='invoice-number'>Invoice #{data.InvoiceNumber}</div>
<p>Date: {data.InvoiceDate:yyyy-MM-dd}</p>
<p>Due: {data.DueDate:yyyy-MM-dd}</p>
</div>
</div>
");
// Add line items table
html.Append(@"
<table>
<thead>
<tr>
<th>Description</th>
<th>Quantity</th>
<th>Unit Price</th>
<th>Total</th>
</tr>
</thead>
<tbody>
");
foreach (var item in data.LineItems)
{
html.Append($@"
<tr>
<td>{item.Description}</td>
<td>{item.Quantity}</td>
<td>${item.UnitPrice:F2}</td>
<td>${item.Total:F2}</td>
</tr>
");
}
html.Append($@"
</tbody>
<tfoot>
<tr class='total-row'>
<td colspan='3'>Total</td>
<td>${data.Total:F2}</td>
</tr>
</tfoot>
</table>
</body>
</html>
");
// Configure renderer for optimal output
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
// Generate PDF with proper base path for assets
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
// Add security if needed
pdf.SecuritySettings.UserPassword = data.CustomerEmail;
pdf.SecuritySettings.AllowUserPrinting = true;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
return pdf;
}
}
Imports IronPdf
Imports System.Text
Public Class HtmlStringToPdfConverter
Public Shared Function GenerateInvoice(ByVal data As InvoiceData) As PdfDocument
' Build dynamic HTML with modern CSS
Dim html = New StringBuilder()
html.Append("
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 20px;
color: #333;
}
.invoice-header {
display: flex;
justify-content: space-between;
border-bottom: 2px solid #007bff;
padding-bottom: 20px;
margin-bottom: 30px;
}
.company-logo {
width: 150px;
height: auto;
}
.invoice-details {
text-align: right;
}
.invoice-number {
font-size: 24px;
font-weight: 700;
color: #007bff;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th {
background-color: #f8f9fa;
padding: 12px;
text-align: left;
border-bottom: 2px solid #dee2e6;
}
td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
}
.total-row {
font-weight: 700;
font-size: 18px;
background-color: #e9ecef;
}
@media print {
body { margin: 0; }
.no-print { display: none; }
}
</style>
</head>
<body>
")
' Add invoice header
html.Append($"
<div class='invoice-header'>
<div>
<img src='data:image/png;base64,{data.CompanyLogoBase64}' class='company-logo' alt='Company Logo'>
<h2>{data.CompanyName}</h2>
<p>{data.CompanyAddress}</p>
</div>
<div class='invoice-details'>
<div class='invoice-number'>Invoice #{data.InvoiceNumber}</div>
<p>Date: {data.InvoiceDate:yyyy-MM-dd}</p>
<p>Due: {data.DueDate:yyyy-MM-dd}</p>
</div>
</div>
")
' Add line items table
html.Append("
<table>
<thead>
<tr>
<th>Description</th>
<th>Quantity</th>
<th>Unit Price</th>
<th>Total</th>
</tr>
</thead>
<tbody>
")
For Each item In data.LineItems
html.Append($"
<tr>
<td>{item.Description}</td>
<td>{item.Quantity}</td>
<td>${item.UnitPrice:F2}</td>
<td>${item.Total:F2}</td>
</tr>
")
Next item
html.Append($"
</tbody>
<tfoot>
<tr class='total-row'>
<td colspan='3'>Total</td>
<td>${data.Total:F2}</td>
</tr>
</tfoot>
</table>
</body>
</html>
")
' Configure renderer for optimal output
Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print
renderer.RenderingOptions.EnableJavaScript = True
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
' Generate PDF with proper base path for assets
Dim pdf = renderer.RenderHtmlAsPdf(html.ToString())
' Add security if needed
pdf.SecuritySettings.UserPassword = data.CustomerEmail
pdf.SecuritySettings.AllowUserPrinting = True
pdf.SecuritySettings.AllowUserCopyPasteContent = False
Return pdf
End Function
End Class
Key advantages of IronPDF's HTML rendering:
- Full CSS3 support including flexbox and grid layouts
- Google Fonts and web font integration
- JavaScript chart libraries (Chart.js, D3.js) render perfectly
- Responsive design support with viewport control
- Base64 image embedding for self-contained documents
HTML String to PDF with PDFTron (Apryse)
PDFTron's approach to HTML string conversion:
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
public class PdfTronHtmlConverter
{
public static void ConvertHtmlString(string htmlContent, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
// Create HTML2PDF converter instance
HTML2PDF converter = new HTML2PDF();
// Configure page settings
converter.SetPaperSize(PrinterMode.PaperSize.e_letter);
converter.SetLandscape(false);
converter.SetMargins(1.0, 1.0, 1.0, 1.0, HTML2PDF.e_inches);
// Enable images and backgrounds
HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
settings.SetPrintBackground(true);
settings.SetLoadImages(true);
settings.SetJavaScriptDelay(1000); // Limited JS support
// Insert HTML content
converter.InsertFromHtmlString(htmlContent);
// Convert to PDF
if (converter.Convert(doc))
{
// Post-processing options
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
}
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
public class PdfTronHtmlConverter
{
public static void ConvertHtmlString(string htmlContent, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
// Create HTML2PDF converter instance
HTML2PDF converter = new HTML2PDF();
// Configure page settings
converter.SetPaperSize(PrinterMode.PaperSize.e_letter);
converter.SetLandscape(false);
converter.SetMargins(1.0, 1.0, 1.0, 1.0, HTML2PDF.e_inches);
// Enable images and backgrounds
HTML2PDF.WebPageSettings settings = new HTML2PDF.WebPageSettings();
settings.SetPrintBackground(true);
settings.SetLoadImages(true);
settings.SetJavaScriptDelay(1000); // Limited JS support
// Insert HTML content
converter.InsertFromHtmlString(htmlContent);
// Convert to PDF
if (converter.Convert(doc))
{
// Post-processing options
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
}
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Public Class PdfTronHtmlConverter
Public Shared Sub ConvertHtmlString(ByVal htmlContent As String, ByVal outputPath As String)
PDFNet.Initialize("your-license-key")
Using doc As New PDFDoc()
' Create HTML2PDF converter instance
Dim converter As New HTML2PDF()
' Configure page settings
converter.SetPaperSize(PrinterMode.PaperSize.e_letter)
converter.SetLandscape(False)
converter.SetMargins(1.0, 1.0, 1.0, 1.0, HTML2PDF.e_inches)
' Enable images and backgrounds
Dim settings As New HTML2PDF.WebPageSettings()
settings.SetPrintBackground(True)
settings.SetLoadImages(True)
settings.SetJavaScriptDelay(1000) ' Limited JS support
' Insert HTML content
converter.InsertFromHtmlString(htmlContent)
' Convert to PDF
If converter.Convert(doc) Then
' Post-processing options
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized)
End If
End Using
End Sub
End Class
PDFTron HTML limitations to consider:
- Basic CSS support (no advanced layouts)
- Limited JavaScript execution
- Font embedding requires additional configuration
- Better suited for simple document layouts
How Can I Convert ASPX Pages to PDF?
Converting ASPX pages to PDF is a common requirement for ASP.NET applications. IronPDF provides native support, while PDFTron requires workarounds.
ASPX to PDF with IronPDF
IronPDF offers seamless ASPX conversion with a single line of code:
using IronPdf;
public partial class InvoicePage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Render the current ASPX page as PDF on page load
if (Request.QueryString["pdf"] == "true")
{
// Configure PDF output options
AspxToPdf.RenderThisPageAsPdf(
AspxToPdf.FileBehavior.InBrowser,
"Invoice_" + DateTime.Now.ToString("yyyyMMdd") + ".pdf");
}
}
protected void ExportToPdfButton_Click(object sender, EventArgs e)
{
// Advanced configuration for ASPX to PDF
IronPdf.AspxToPdf.RenderThisPageAsPdf(
IronPdf.AspxToPdf.FileBehavior.Attachment,
"Invoice.pdf",
new ChromePdfRenderOptions()
{
PaperSize = PdfPaperSize.A4,
MarginTop = 20,
MarginBottom = 20,
CssMediaType = PdfCssMediaType.Print,
EnableJavaScript = true,
CreatePdfFormsFromHtml = true,
FitToPaper = true
});
}
}
using IronPdf;
public partial class InvoicePage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Render the current ASPX page as PDF on page load
if (Request.QueryString["pdf"] == "true")
{
// Configure PDF output options
AspxToPdf.RenderThisPageAsPdf(
AspxToPdf.FileBehavior.InBrowser,
"Invoice_" + DateTime.Now.ToString("yyyyMMdd") + ".pdf");
}
}
protected void ExportToPdfButton_Click(object sender, EventArgs e)
{
// Advanced configuration for ASPX to PDF
IronPdf.AspxToPdf.RenderThisPageAsPdf(
IronPdf.AspxToPdf.FileBehavior.Attachment,
"Invoice.pdf",
new ChromePdfRenderOptions()
{
PaperSize = PdfPaperSize.A4,
MarginTop = 20,
MarginBottom = 20,
CssMediaType = PdfCssMediaType.Print,
EnableJavaScript = true,
CreatePdfFormsFromHtml = true,
FitToPaper = true
});
}
}
Imports IronPdf
Partial Public Class InvoicePage
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
' Render the current ASPX page as PDF on page load
If Request.QueryString("pdf") = "true" Then
' Configure PDF output options
AspxToPdf.RenderThisPageAsPdf(AspxToPdf.FileBehavior.InBrowser, "Invoice_" & DateTime.Now.ToString("yyyyMMdd") & ".pdf")
End If
End Sub
Protected Sub ExportToPdfButton_Click(ByVal sender As Object, ByVal e As EventArgs)
' Advanced configuration for ASPX to PDF
IronPdf.AspxToPdf.RenderThisPageAsPdf(IronPdf.AspxToPdf.FileBehavior.Attachment, "Invoice.pdf", New ChromePdfRenderOptions() With {
.PaperSize = PdfPaperSize.A4,
.MarginTop = 20,
.MarginBottom = 20,
.CssMediaType = PdfCssMediaType.Print,
.EnableJavaScript = True,
.CreatePdfFormsFromHtml = True,
.FitToPaper = True
})
End Sub
End Class
For more control over the rendering process:
// In Global.asax.cs or Startup.cs
public static void ConfigureAspxToPdf()
{
// Set global defaults for all ASPX to PDF conversions
AspxToPdf.GlobalSettings.PaperSize = PdfPaperSize.A4;
AspxToPdf.GlobalSettings.PrintHtmlBackgrounds = true;
AspxToPdf.GlobalSettings.EnableJavaScript = true;
AspxToPdf.GlobalSettings.CssMediaType = PdfCssMediaType.Screen;
// Custom headers and footers
AspxToPdf.GlobalSettings.HtmlHeader = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align: center; font-size: 12px;'>{page} of {total-pages}</div>",
Height = 25
};
}
// In Global.asax.cs or Startup.cs
public static void ConfigureAspxToPdf()
{
// Set global defaults for all ASPX to PDF conversions
AspxToPdf.GlobalSettings.PaperSize = PdfPaperSize.A4;
AspxToPdf.GlobalSettings.PrintHtmlBackgrounds = true;
AspxToPdf.GlobalSettings.EnableJavaScript = true;
AspxToPdf.GlobalSettings.CssMediaType = PdfCssMediaType.Screen;
// Custom headers and footers
AspxToPdf.GlobalSettings.HtmlHeader = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align: center; font-size: 12px;'>{page} of {total-pages}</div>",
Height = 25
};
}
' In Global.asax.cs or Startup.cs
Public Shared Sub ConfigureAspxToPdf()
' Set global defaults for all ASPX to PDF conversions
AspxToPdf.GlobalSettings.PaperSize = PdfPaperSize.A4
AspxToPdf.GlobalSettings.PrintHtmlBackgrounds = True
AspxToPdf.GlobalSettings.EnableJavaScript = True
AspxToPdf.GlobalSettings.CssMediaType = PdfCssMediaType.Screen
' Custom headers and footers
AspxToPdf.GlobalSettings.HtmlHeader = New HtmlHeaderFooter() With {
.HtmlFragment = "<div style='text-align: center; font-size: 12px;'>{page} of {total-pages}</div>",
.Height = 25
}
End Sub
IronPDF's ASPX to PDF feature preserves:
ViewState
and form values- Session state data
- CSS styling and layouts
- JavaScript-rendered content
- Master page layouts
ASPX Alternative with PDFTron
PDFTron doesn't offer direct ASPX support, requiring indirect approaches:
// Capture ASPX output as HTML, then convert
public void ConvertAspxWithPdfTron()
{
// Render ASPX to string first
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
// Render the page to HTML
this.RenderControl(hw);
string htmlContent = sw.ToString();
// Then use PDFTron's HTML2PDF
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
HTML2PDF converter = new HTML2PDF();
converter.InsertFromHtmlString(htmlContent);
converter.Convert(doc);
// Send to browser
byte[] pdfBytes = doc.Save(SDFDoc.SaveOptions.e_linearized);
Response.ContentType = "application/pdf";
Response.BinaryWrite(pdfBytes);
Response.End();
}
}
// Capture ASPX output as HTML, then convert
public void ConvertAspxWithPdfTron()
{
// Render ASPX to string first
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
// Render the page to HTML
this.RenderControl(hw);
string htmlContent = sw.ToString();
// Then use PDFTron's HTML2PDF
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
HTML2PDF converter = new HTML2PDF();
converter.InsertFromHtmlString(htmlContent);
converter.Convert(doc);
// Send to browser
byte[] pdfBytes = doc.Save(SDFDoc.SaveOptions.e_linearized);
Response.ContentType = "application/pdf";
Response.BinaryWrite(pdfBytes);
Response.End();
}
}
' Capture ASPX output as HTML, then convert
Public Sub ConvertAspxWithPdfTron()
' Render ASPX to string first
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
' Render the page to HTML
Me.RenderControl(hw)
Dim htmlContent As String = sw.ToString()
' Then use PDFTron's HTML2PDF
PDFNet.Initialize("your-license-key")
Using doc As New PDFDoc()
Dim converter As New HTML2PDF()
converter.InsertFromHtmlString(htmlContent)
converter.Convert(doc)
' Send to browser
Dim pdfBytes() As Byte = doc.Save(SDFDoc.SaveOptions.e_linearized)
Response.ContentType = "application/pdf"
Response.BinaryWrite(pdfBytes)
Response.End()
End Using
End Sub
How Do I Convert Images to PDF?
Image to PDF conversion is essential for document archiving and portfolio creation. Both libraries offer this functionality with different approaches.
Image to PDF with IronPDF
IronPDF provides a dedicated ImageToPdfConverter
class for efficient batch processing:
using IronPdf;
using System.IO;
using System.Linq;
public class ImagePdfGenerator
{
public static void CreatePhotoAlbum(string imageFolder, string outputPath)
{
// Get all supported image files
var supportedExtensions = new[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".svg" };
var imageFiles = Directory.GetFiles(imageFolder)
.Where(f => supportedExtensions.Contains(Path.GetExtension(f).ToLower()))
.OrderBy(f => f);
// Convert images to PDF with options
var pdf = ImageToPdfConverter.ImageToPdf(imageFiles, ImageBehavior.FitToPage);
// Add metadata
pdf.MetaData.Title = "Photo Album";
pdf.MetaData.Author = "Photography Department";
pdf.MetaData.CreationDate = DateTime.Now;
// Apply compression for smaller file size
pdf.CompressImages(80); // 80% quality
// Save the PDF
pdf.SaveAs(outputPath);
}
public static void CreateThumbnailCatalog(List<ProductImage> images)
{
var renderer = new ChromePdfRenderer();
// Build HTML with image grid
var html = @"
<html>
<head>
<style>
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
padding: 20px;
}
.image-item {
text-align: center;
}
.image-item img {
max-width: 100%;
height: 200px;
object-fit: cover;
border: 1px solid #ddd;
}
.image-caption {
margin-top: 10px;
font-size: 12px;
}
</style>
</head>
<body>
<h1>Product Catalog</h1>
<div class='image-grid'>";
foreach (var image in images)
{
html += $@"
<div class='image-item'>
<img src='data:image/jpeg;base64,{image.Base64Data}' />
<div class='image-caption'>{image.ProductName}</div>
</div>";
}
html += "</div></body></html>";
// Render with optimal settings for images
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("product-catalog.pdf");
}
}
using IronPdf;
using System.IO;
using System.Linq;
public class ImagePdfGenerator
{
public static void CreatePhotoAlbum(string imageFolder, string outputPath)
{
// Get all supported image files
var supportedExtensions = new[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".svg" };
var imageFiles = Directory.GetFiles(imageFolder)
.Where(f => supportedExtensions.Contains(Path.GetExtension(f).ToLower()))
.OrderBy(f => f);
// Convert images to PDF with options
var pdf = ImageToPdfConverter.ImageToPdf(imageFiles, ImageBehavior.FitToPage);
// Add metadata
pdf.MetaData.Title = "Photo Album";
pdf.MetaData.Author = "Photography Department";
pdf.MetaData.CreationDate = DateTime.Now;
// Apply compression for smaller file size
pdf.CompressImages(80); // 80% quality
// Save the PDF
pdf.SaveAs(outputPath);
}
public static void CreateThumbnailCatalog(List<ProductImage> images)
{
var renderer = new ChromePdfRenderer();
// Build HTML with image grid
var html = @"
<html>
<head>
<style>
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
padding: 20px;
}
.image-item {
text-align: center;
}
.image-item img {
max-width: 100%;
height: 200px;
object-fit: cover;
border: 1px solid #ddd;
}
.image-caption {
margin-top: 10px;
font-size: 12px;
}
</style>
</head>
<body>
<h1>Product Catalog</h1>
<div class='image-grid'>";
foreach (var image in images)
{
html += $@"
<div class='image-item'>
<img src='data:image/jpeg;base64,{image.Base64Data}' />
<div class='image-caption'>{image.ProductName}</div>
</div>";
}
html += "</div></body></html>";
// Render with optimal settings for images
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print;
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("product-catalog.pdf");
}
}
Imports IronPdf
Imports System.IO
Imports System.Linq
Public Class ImagePdfGenerator
Public Shared Sub CreatePhotoAlbum(ByVal imageFolder As String, ByVal outputPath As String)
' Get all supported image files
Dim supportedExtensions = { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".svg" }
Dim imageFiles = Directory.GetFiles(imageFolder).Where(Function(f) supportedExtensions.Contains(Path.GetExtension(f).ToLower())).OrderBy(Function(f) f)
' Convert images to PDF with options
Dim pdf = ImageToPdfConverter.ImageToPdf(imageFiles, ImageBehavior.FitToPage)
' Add metadata
pdf.MetaData.Title = "Photo Album"
pdf.MetaData.Author = "Photography Department"
pdf.MetaData.CreationDate = DateTime.Now
' Apply compression for smaller file size
pdf.CompressImages(80) ' 80% quality
' Save the PDF
pdf.SaveAs(outputPath)
End Sub
Public Shared Sub CreateThumbnailCatalog(ByVal images As List(Of ProductImage))
Dim renderer = New ChromePdfRenderer()
' Build HTML with image grid
Dim html = "
<html>
<head>
<style>
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
padding: 20px;
}
.image-item {
text-align: center;
}
.image-item img {
max-width: 100%;
height: 200px;
object-fit: cover;
border: 1px solid #ddd;
}
.image-caption {
margin-top: 10px;
font-size: 12px;
}
</style>
</head>
<body>
<h1>Product Catalog</h1>
<div class='image-grid'>"
For Each image In images
html &= $"
<div class='image-item'>
<img src='data:image/jpeg;base64,{image.Base64Data}' />
<div class='image-caption'>{image.ProductName}</div>
</div>"
Next image
html &= "</div></body></html>"
' Render with optimal settings for images
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Print
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("product-catalog.pdf")
End Sub
End Class
Advanced image handling features:
- SVG to PDF conversion with vector quality preservation
- Batch processing with memory optimization
- Custom sizing and positioning options
- EXIF data preservation
Image to PDF with PDFTron (Apryse)
PDFTron uses its conversion API for image handling:
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
public class PdfTronImageConverter
{
public static void ConvertImageToPdf(string imagePath, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
// Use Convert API for image to PDF
pdftron.PDF.Convert.ToPdf(doc, imagePath);
// Additional image processing
PageIterator itr = doc.GetPageIterator();
while (itr.HasNext())
{
Page page = itr.Current();
// Adjust page size to image
Rect crop_box = page.GetCropBox();
page.SetMediaBox(crop_box);
itr.Next();
}
// Save optimized PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
public static void CreateMultiPageImagePdf(string[] imagePaths, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
ElementBuilder builder = new ElementBuilder();
ElementWriter writer = new ElementWriter();
foreach (string imagePath in imagePaths)
{
// Create a new page for each image
Page page = doc.PageCreate();
writer.Begin(page);
// Add image to page
Image img = Image.Create(doc, imagePath);
Element element = builder.CreateImage(img, 0, 0, 612, 792);
writer.WritePlacedElement(element);
writer.End();
doc.PagePushBack(page);
}
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
public class PdfTronImageConverter
{
public static void ConvertImageToPdf(string imagePath, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
// Use Convert API for image to PDF
pdftron.PDF.Convert.ToPdf(doc, imagePath);
// Additional image processing
PageIterator itr = doc.GetPageIterator();
while (itr.HasNext())
{
Page page = itr.Current();
// Adjust page size to image
Rect crop_box = page.GetCropBox();
page.SetMediaBox(crop_box);
itr.Next();
}
// Save optimized PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
public static void CreateMultiPageImagePdf(string[] imagePaths, string outputPath)
{
PDFNet.Initialize("your-license-key");
using (PDFDoc doc = new PDFDoc())
{
ElementBuilder builder = new ElementBuilder();
ElementWriter writer = new ElementWriter();
foreach (string imagePath in imagePaths)
{
// Create a new page for each image
Page page = doc.PageCreate();
writer.Begin(page);
// Add image to page
Image img = Image.Create(doc, imagePath);
Element element = builder.CreateImage(img, 0, 0, 612, 792);
writer.WritePlacedElement(element);
writer.End();
doc.PagePushBack(page);
}
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized);
}
}
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Public Class PdfTronImageConverter
Public Shared Sub ConvertImageToPdf(ByVal imagePath As String, ByVal outputPath As String)
PDFNet.Initialize("your-license-key")
Using doc As New PDFDoc()
' Use Convert API for image to PDF
pdftron.PDF.Convert.ToPdf(doc, imagePath)
' Additional image processing
Dim itr As PageIterator = doc.GetPageIterator()
Do While itr.HasNext()
Dim page As Page = itr.Current()
' Adjust page size to image
Dim crop_box As Rect = page.GetCropBox()
page.SetMediaBox(crop_box)
itr.Next()
Loop
' Save optimized PDF
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
Public Shared Sub CreateMultiPageImagePdf(ByVal imagePaths() As String, ByVal outputPath As String)
PDFNet.Initialize("your-license-key")
Using doc As New PDFDoc()
Dim builder As New ElementBuilder()
Dim writer As New ElementWriter()
For Each imagePath As String In imagePaths
' Create a new page for each image
Dim page As Page = doc.PageCreate()
writer.Begin(page)
' Add image to page
Dim img As Image = Image.Create(doc, imagePath)
Dim element As Element = builder.CreateImage(img, 0, 0, 612, 792)
writer.WritePlacedElement(element)
writer.End()
doc.PagePushBack(page)
Next imagePath
doc.Save(outputPath, SDFDoc.SaveOptions.e_linearized)
End Using
End Sub
End Class
What Are the Licensing Options and Costs?
Understanding licensing is crucial for budgeting and compliance. The two libraries have vastly different pricing models.
IronPDF Licensing
IronPDF has 3 pricing edition(s), from $749 to $2,999. A free trial of IronPDF is also available. IronPDF offers transparent, published pricing:
License Tiers:
Lite License: $749
- 1 developer
- 1 location
- 1 project
- Ideal for individual developers or small projects
Plus License: $1,499
- 3 developers
- 3 locations
- 3 projects
- Perfect for small teams
Professional License: $2,999
- 10 developers
- 10 locations
- 10 projects
- Best for growing teams
- Unlimited License: Custom pricing
- Unlimited developers
- Unlimited locations
- Unlimited projects
Additional Options:
- Royalty-Free Redistribution: +$1,999 (one-time)
- SaaS/OEM licensing available
- Iron Suite bundle: Get 10 products for the price of 2
All Team Licenses are non-transferable and sharing of licenses outside an organization or agency/client relationship is prohibited.
PDFTron (Apryse) Licensing
PDFTron's licensing is quote-based with no published pricing. Based on user feedback and industry reports:
Estimated Pricing Ranges:
- Small Business: $5,000 - $15,000 annually
- Enterprise: $30,000 - $100,000+ annually
- Additional modules require separate licenses
Pricing transparency is a big con in PDFTRON. Everything is an add-on, requiring specific licensing terms and contracts. Users report:
- After 6500$ invested in PDFTRON, their product simply didn't work as advertised, leaving us empty handed and a whole mess to cleanup up in our product.
- Complex licensing negotiations required
- Per-module pricing increases total cost
- Limited refund policies
Key Differences:
- IronPDF: Perpetual licenses, one-time payment
- PDFTron: Often subscription-based or annual fees
- IronPDF: All features included in base license
- PDFTron: Core features with paid add-ons
How Do Support Options Compare?
Developer support can make or break project timelines. Here's how each vendor approaches customer assistance.
IronPDF Support
IronPDF includes professional support with all licenses:
- 24/5 engineering support via email
- Direct access to development team
- Typical response time: 24-48 hours
- Comprehensive documentation
- Active community forums
- Video tutorials and code examples
The IronPDF library works in Azure WebApps, Functions and WebJobs. It works in both Linux and Windows variants, although I would recommend Windows variant Functions and WebApps as significantly better tested and easier to install.
PDFTron (Apryse) Support
PDFTron's support varies by license tier:
- The cost of PDFTron is high. The importance to our business justifies the cost, but it was definitely a hurdle for us when comparing this product to other PDF web solutions.
- Forum-based support for basic licenses
- Paid support plans available
- Occasionally support can be lacking and the developers are left to struggle through it themselves.
- Response times vary by support tier
What Are the Performance Characteristics?
Performance impacts user experience and server costs. Let's examine real-world performance data.
IronPDF Performance
Recent improvements have enhanced IronPDF's performance significantly:
// Optimized batch processing example
public async Task BatchConvertWithPerformanceMonitoring()
{
var renderer = new ChromePdfRenderer();
// Configure for performance
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen;
renderer.RenderingOptions.RenderDelay = 0; // No delay for static content
renderer.RenderingOptions.Timeout = 30; // 30 second timeout
// Enable parallel processing
var tasks = new List<Task<PdfDocument>>();
var urls = GetUrlsToConvert();
// Process in parallel with throttling
using (var semaphore = new SemaphoreSlim(4)) // Max 4 concurrent
{
foreach (var url in urls)
{
await semaphore.WaitAsync();
tasks.Add(Task.Run(async () =>
{
try
{
return await renderer.RenderUrlAsPdfAsync(url);
}
finally
{
semaphore.Release();
}
}));
}
var results = await Task.WhenAll(tasks);
// Merge results if needed
var merged = PdfDocument.Merge(results);
merged.SaveAs("batch-output.pdf");
}
}
// Optimized batch processing example
public async Task BatchConvertWithPerformanceMonitoring()
{
var renderer = new ChromePdfRenderer();
// Configure for performance
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen;
renderer.RenderingOptions.RenderDelay = 0; // No delay for static content
renderer.RenderingOptions.Timeout = 30; // 30 second timeout
// Enable parallel processing
var tasks = new List<Task<PdfDocument>>();
var urls = GetUrlsToConvert();
// Process in parallel with throttling
using (var semaphore = new SemaphoreSlim(4)) // Max 4 concurrent
{
foreach (var url in urls)
{
await semaphore.WaitAsync();
tasks.Add(Task.Run(async () =>
{
try
{
return await renderer.RenderUrlAsPdfAsync(url);
}
finally
{
semaphore.Release();
}
}));
}
var results = await Task.WhenAll(tasks);
// Merge results if needed
var merged = PdfDocument.Merge(results);
merged.SaveAs("batch-output.pdf");
}
}
' Optimized batch processing example
Public Async Function BatchConvertWithPerformanceMonitoring() As Task
Dim renderer = New ChromePdfRenderer()
' Configure for performance
renderer.RenderingOptions.CssMediaType = PdfCssMediaType.Screen
renderer.RenderingOptions.RenderDelay = 0 ' No delay for static content
renderer.RenderingOptions.Timeout = 30 ' 30 second timeout
' Enable parallel processing
Dim tasks = New List(Of Task(Of PdfDocument))()
Dim urls = GetUrlsToConvert()
' Process in parallel with throttling
Using semaphore = New SemaphoreSlim(4) ' Max 4 concurrent
For Each url In urls
Await semaphore.WaitAsync()
tasks.Add(Task.Run(Async Function()
Try
Return Await renderer.RenderUrlAsPdfAsync(url)
Finally
semaphore.Release()
End Try
End Function))
Next url
Dim results = Await Task.WhenAll(tasks)
' Merge results if needed
Dim merged = PdfDocument.Merge(results)
merged.SaveAs("batch-output.pdf")
End Using
End Function
Performance metrics from production environments:
- Simple HTML: 200-400ms
- Complex HTML with CSS/JS: 800-1200ms
- IronPDF does have Async variants of render methods such as documented here ironpdf.com/examples/async. Using
Parallel.ForEach
was the highest performing strategy for batch rendering Html To PDF for my use case
PDFTron (Apryse) Performance
PDFTron generally offers faster raw performance for simple conversions:
- Basic HTML: 100-300ms
- Office documents: 500-1000ms
- Lower memory footprint
- Better for high-volume simple documents
However, users report issues with complex scenarios:
- Bugs do crop up from time to time. Sometimes pretty detrimental ones that should have probably been seen in QA testing. It can take a while for them to eventually get fixed.
When Should I Choose Each Library?
Making the right choice depends on your specific requirements and constraints.
Choose IronPDF When:
HTML/CSS Fidelity is Critical
- Modern web applications with complex layouts
- JavaScript-heavy content
- Responsive designs that need preservation
Rapid Development is Priority
- Simple API reduces development time
- Extensive code examples
- Minimal learning curve
Budget Transparency Matters
- Published pricing enables accurate budgeting
- No surprise costs or hidden fees
- Includes all features in base license
You Need Specific Features
- ASPX to PDF conversion
- Azure and cloud optimization
- Comprehensive HTML/CSS/JS support
Choose PDFTron (Apryse) When:
Enterprise Document Workflows
- Complex form processing with XFA support
- CAD file conversions (DWG, DXF)
- Advanced Office document handling
Performance Over Features
- High-volume simple document processing
- Lower memory requirements
- Basic HTML conversion needs
Specialized Requirements
- Built-in document viewer components
- Extensive annotation types (30+)
- Legacy system integration
Large Enterprise Environment
- Dedicated support contracts
- Custom feature development
- Compliance certifications
Summary and Conclusion
Both IronPDF and PDFTron (Apryse) are capable PDF libraries, but they serve different market segments and use cases.
IronPDF excels in:
- Modern web technology support (HTML5, CSS3, JavaScript)
- Developer-friendly API design
- Transparent, affordable pricing
- Rapid application development
- Cloud and containerized deployments
PDFTron (Apryse) strengths include:
- Enterprise document workflows
- CAD and specialized format support
- Lower resource consumption
- Extensive annotation capabilities
- Legacy system compatibility
For most .NET developers building modern applications, IronPDF offers the best combination of features, ease of use, and value. Its Chrome-based rendering engine ensures pixel-perfect HTML to PDF conversion, while the straightforward API accelerates development.
PDFTron remains viable for enterprises with specific requirements around CAD conversion, complex form processing, or when working with legacy document formats. However, the lack of pricing transparency and modular licensing structure can significantly increase total costs.
Getting Started
Try IronPDF:
Explore PDFTron:
Remember to thoroughly evaluate both options with your specific use cases before making a decision. Consider factors like long-term costs, support quality, and feature roadmaps alongside technical capabilities.
Frequently Asked Questions
How can I convert HTML to PDF in C#?
You can use IronPDF's RenderHtmlAsPdf
method to convert HTML strings into PDFs. You can also convert HTML files into PDFs using RenderHtmlFileAsPdf
.
What are the performance differences between IronPDF and PDFTron for HTML to PDF conversion?
IronPDF provides superior rendering for complex web content with its Chrome-based engine, offering better support for JavaScript and CSS3. PDFTron, though faster for simple HTML, may not handle complex content as effectively.
What are the licensing options for IronPDF and PDFTron?
IronPDF offers transparent and perpetual licenses with all features included starting at $749. PDFTron, however, requires custom quotes for licensing, which can range from $5,000 to $100,000+ annually.
Is it possible to convert ASPX pages to PDF using these libraries?
Yes, IronPDF can convert ASPX pages to PDF using the AspxToPdf.RenderThisPageAsPdf
method in a single line of code. PDFTron does not directly support ASPX page conversion.
Which library is more suitable for cloud environments like Azure?
IronPDF is optimized for cloud environments, including Azure and AWS, and works seamlessly with Functions and WebApps. PDFTron may require additional configuration for optimal cloud deployment.
Can you create fillable PDF forms with IronPDF or PDFTron?
Yes, both libraries support creating fillable PDF forms. IronPDF uses CreatePdfFormsFromHtml
for automatic conversion of HTML forms. PDFTron provides extensive form field types but requires more complex integration.
What support options are available for IronPDF and PDFTron users?
IronPDF offers 24/5 engineering support with direct developer access and a typical response time of 24-48 hours. PDFTron's support options vary based on the license tier, with basic forum support and paid direct assistance.
How do IronPDF and PDFTron compare in handling password-protected websites?
IronPDF supports authentication through ChromeHttpLoginCredentials
for handling login forms and HTTP authentication, while PDFTron has limited support for this feature.