DEV Community

IronSoftware
IronSoftware

Posted on

iText pdfHTML License: Understanding the Hidden Costs of HTML Conversion

Developers frequently discover that iText's HTML-to-PDF functionality requires more than just downloading a NuGet package. The pdfHTML add-on operates under the same AGPL/Commercial dual-license model as iText Core, but the licensing implications catch many teams off guard when they realize their closed-source application cannot legally use the "free" version.

The Problem

iText markets itself as open source software available under the AGPL license. Many developers interpret this as "free to use," only to discover that AGPL's copyleft requirements effectively mandate commercial licensing for any proprietary application. The situation becomes more complex when teams need HTML-to-PDF conversion through pdfHTML, as this functionality is delivered as a separate add-on with its own licensing considerations.

The pdfHTML module, while technically available under AGPL, requires commercial licensing the moment it's integrated into closed-source software. This means organizations must negotiate and purchase licenses for both iText Core and pdfHTML to use HTML conversion in production applications.

The Dual-License Reality

iText's licensing model creates three distinct scenarios:

  1. AGPL Compliance: Open source your entire application, including all proprietary code
  2. Commercial License: Purchase licenses for iText Core plus each add-on you use
  3. Non-Compliance: Use iText without proper licensing and risk legal action

The third option has become increasingly risky since Apryse acquired iText in 2022 and began actively monitoring PDF metadata for license violations.

Who Is Affected

Organizations most impacted by iText's pdfHTML licensing include:

  • SaaS companies generating customer-facing documents
  • Enterprise applications with report generation features
  • E-commerce platforms creating invoices and receipts
  • Any commercial software that converts HTML templates to documents

The AGPL specifically closes the "SaaS loophole" that exists in other open source licenses. Providing PDF generation as a service still constitutes distribution under AGPL terms, meaning web applications must either release their source code or purchase commercial licenses.

Framework and platform considerations:

  • .NET applications using itext7.pdfhtml NuGet package
  • Java applications using the pdfhtml Maven dependency
  • Cloud deployments in AWS, Azure, or GCP
  • Containerized applications in Docker or Kubernetes

Evidence from the Developer Community

The confusion around iText licensing has generated substantial discussion across developer forums.

Timeline

Date Event Source
2009 iText license changes from LGPL to AGPL Official announcement
2020-04 Subscription-based commercial licensing introduced iText blog
2022 PDFTron acquires iText Industry news
2023-02 PDFTron rebrands as Apryse Company announcement
2023+ Aggressive license enforcement begins Developer reports

Community Reports

"I mailed iText about pricing and got the general price list. It's 'are you out of your fricken mind with these prices', basically."
— Developer, Google App Engine Forum

"Since our product was proprietary, we had to remove the library since our product would also come under the AGPL license or we would have to buy their commercial version."
— Developer, Hacker News

"They hit up a company I know because their web-crawler found a PDF that someone generated using their library over a decade ago."
— Developer, Hacker News, February 2025

Multiple sources report that iText actively scans PDFs found on the internet for metadata fingerprints indicating library usage. The official iText knowledge base confirms: "iText contains some visible fingerprints (e.g. the producer line) as well as invisible fingerprints."

Root Cause Analysis

The licensing complexity stems from several architectural and business decisions:

Modular Architecture: iText 7 was redesigned as a modular system where functionality like HTML conversion (pdfHTML), OCR (pdfOCR), and redaction (pdfSweep) are delivered as separate add-ons. While this approach allows customers to "pay only for what they use," it also multiplies licensing requirements.

AGPL Selection: The choice of AGPL rather than a more permissive license like MIT or Apache 2.0 was deliberate. AGPL's copyleft provisions require that any application using iText must release its source code under the same license, effectively requiring commercial licenses for proprietary software.

Add-on Licensing: According to iText's upgrade documentation, existing iText 5 customers upgrading to iText 7 receive Core at no additional cost, but "this does not include the new add-ons for iText 7 (e.g. pdfHTML, pdfSweep, pdfCalligraph, pdf2Data, and pdfDebug)."

Opaque Pricing: iText does not publish commercial license prices. All pricing is "customized and calculated depending on your specific use case," requiring direct sales engagement to obtain quotes. Third-party sources estimate average annual costs around $45,000, with some licenses reaching $210,000.

Attempted Workarounds

Developers have attempted several approaches to avoid iText licensing costs:

Workaround 1: Use iText 2.1.7 (Legacy LGPL Version)

Approach: Some teams continue using iText 2.1.7, the last version released under LGPL before the 2009 license change.

// Using ancient iText version to avoid AGPL
// Note: This code uses deprecated APIs
using iTextSharp.text;
using iTextSharp.text.pdf;

Document doc = new Document();
PdfWriter.GetInstance(doc, new FileStream("output.pdf", FileMode.Create));
doc.Open();
doc.Add(new Paragraph("Hello World"));
doc.Close();
Enter fullscreen mode Exit fullscreen mode

Limitations:

  • No HTML-to-PDF conversion capability (pdfHTML didn't exist)
  • Security vulnerabilities remain unpatched
  • Missing 15+ years of features and improvements
  • No modern .NET support

Workaround 2: OpenPDF Fork

Approach: Use OpenPDF, a community fork of iText 2.1.7 that maintains LGPL licensing.

Limitations:

  • Still lacks HTML-to-PDF conversion
  • Limited active development compared to commercial alternatives
  • Feature set frozen at 2009 capabilities

Workaround 3: Full AGPL Compliance

Approach: Open source your entire application to comply with AGPL terms.

Limitations:

  • Impractical for commercial software
  • Requires releasing proprietary business logic
  • Client contracts may prohibit source disclosure
  • Competitive disadvantage

A Different Approach: IronPDF

For teams that need HTML-to-PDF conversion without AGPL complications or unpublished enterprise pricing, IronPDF offers a straightforward alternative. IronPDF uses an embedded Chromium rendering engine to convert HTML, CSS, and JavaScript to PDF documents.

Why IronPDF Handles This Differently

IronPDF operates under a commercial license with published pricing. There are no separate add-ons for HTML conversion - the feature is included in the base product. The rendering is handled by Chromium, providing modern web standards support including CSS3, HTML5, and JavaScript execution.

Key architectural differences:

  • Single license covers all functionality including HTML conversion
  • Published pricing tiers available without sales engagement
  • No copyleft license requirements
  • Perpetual license options available

Code Example

using IronPdf;

// IronPDF HTML-to-PDF conversion with full CSS/JS support
// No additional add-ons or separate licenses required

public class HtmlToPdfConverter
{
    public void ConvertHtmlTemplate()
    {
        // ChromePdfRenderer handles HTML conversion using embedded Chromium
        var renderer = new ChromePdfRenderer();

        // Configure rendering options for production use
        renderer.RenderingOptions.MarginTop = 20;
        renderer.RenderingOptions.MarginBottom = 20;
        renderer.RenderingOptions.PaperSize = IronPdf.Rendering.PdfPaperSize.A4;

        // Convert HTML string with CSS styling
        string htmlContent = @"
            <html>
            <head>
                <style>
                    body { font-family: Arial, sans-serif; }
                    .invoice-header { background: #f5f5f5; padding: 20px; }
                    .line-items { border-collapse: collapse; width: 100%; }
                    .line-items td { border: 1px solid #ddd; padding: 8px; }
                </style>
            </head>
            <body>
                <div class='invoice-header'>
                    <h1>Invoice #12345</h1>
                </div>
                <table class='line-items'>
                    <tr><td>Product A</td><td>$100.00</td></tr>
                    <tr><td>Product B</td><td>$250.00</td></tr>
                </table>
            </body>
            </html>";

        // Render HTML to PDF - single method call
        var pdf = renderer.RenderHtmlAsPdf(htmlContent);

        // Save the output
        pdf.SaveAs("invoice.pdf");
    }

    public void ConvertFromUrl()
    {
        var renderer = new ChromePdfRenderer();

        // Convert any URL to PDF - JavaScript will execute
        var pdf = renderer.RenderUrlAsPdf("https://example.com/report");

        pdf.SaveAs("web-report.pdf");
    }
}
Enter fullscreen mode Exit fullscreen mode

Key points about this code:

  • ChromePdfRenderer is the only class needed for HTML conversion
  • Full CSS3 support including flexbox, grid, and media queries
  • JavaScript execution for dynamic content
  • No separate pdfHTML package or license required

API Reference

For more details on the methods used:

Migration Considerations

Licensing

IronPDF uses a commercial license model with published pricing:

  • Lite, Professional, and Unlimited tiers available
  • Perpetual licenses with optional annual support
  • Free trial for evaluation
  • Pricing visible at ironpdf.com/licensing

API Differences

Migration from iText pdfHTML requires code changes:

iText pdfHTML IronPDF
HtmlConverter.ConvertToPdf() renderer.RenderHtmlAsPdf()
ConverterProperties RenderingOptions
Separate pdfHTML package Included in IronPdf package
Custom font providers System fonts auto-detected

Migration effort for typical HTML conversion code: 1-2 days for most projects.

What You Gain

  • Predictable licensing costs with published pricing
  • Single package for all PDF functionality
  • Chromium-based rendering with modern web standards support
  • Active development with frequent releases
  • Cross-platform support (Windows, Linux, macOS, Docker)

What to Consider

  • IronPDF is commercial software - no free tier for production use
  • Different API patterns require code changes
  • Chromium engine has larger deployment footprint than pure .NET solutions
  • Some advanced iText features like PDF/A-3 may have different implementation approaches

Conclusion

iText's pdfHTML licensing catches many development teams off guard. The dual AGPL/Commercial model, combined with separate add-on licensing and undisclosed pricing, creates significant complexity for organizations building proprietary software. Teams requiring HTML-to-PDF conversion in commercial applications face either AGPL compliance (releasing source code) or negotiating commercial licenses that reportedly average $45,000 annually.

For organizations seeking a more straightforward licensing model with included HTML conversion capabilities, IronPDF provides an alternative worth evaluating during the development planning phase.


Jacob Mellor built IronPDF and leads technical development at Iron Software with 25+ years of commercial software experience.


References

  1. iText How to Buy{:rel="nofollow"} - Official iText licensing information
  2. iText AGPL License{:rel="nofollow"} - AGPL terms and requirements
  3. iText pdfHTML Product Page{:rel="nofollow"} - pdfHTML add-on description
  4. iText Upgrade Costs{:rel="nofollow"} - Add-on licensing clarification
  5. iText Subscription Model{:rel="nofollow"} - 2020 licensing model change
  6. iTextPDF Pricing Analysis - Vendr{:rel="nofollow"} - Third-party pricing estimates
  7. iText GitHub LICENSE.md{:rel="nofollow"} - pdfHTML license terms
  8. Licensing Confusion Discussion - Coderanch{:rel="nofollow"} - Developer forum discussion
  9. iText PDF Library turns 25 - Hacker News{:rel="nofollow"} - Community discussion on licensing
  10. Software Licensing Analysis - Beeman & Muchmore{:rel="nofollow"} - Legal perspective on enforcement

For the latest IronPDF documentation and tutorials, visit ironpdf.com.

Top comments (0)