An iText alternative for .NET.
SelectPdf converts HTML to PDF with Chromium 154, so pages render as they do in Chrome, JavaScript included; iText's pdfHTML lays HTML out with its own engine and does not run scripts. SelectPdf is sold under a published perpetual license from USD 499, where iText is either AGPL or a commercial license priced by quote. In the same open benchmark, SelectPdf matched Chrome more closely, produced every PDF/A and PDF/UA level valid, and completed up to eight times as many conversions a minute on Linux.
using SelectPdf.Universal;
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(
"https://example.com/");
doc.Save("page.pdf");
doc.Close();
URL to PDF in SelectPdf: the page is loaded and rendered by Chromium.
iText and SelectPdf at a glance.
iText is a PDF library for .NET and Java from Apryse; its pdfHTML add-on converts HTML to PDF. SelectPdf.Universal is the cross-platform .NET PDF library from SelectPdf. Both create, edit and read PDF documents: merge and split, watermarks, form filling, text extraction, digital signatures and PDF/A. They differ most in how they turn HTML into PDF and in how they are licensed.
| SelectPdf | iText | |
|---|---|---|
| HTML engine | Chromium 154.0.8037.58 (stable since September 22, 2026), with JavaScript | pdfHTML's own HTML and CSS layout; no browser, no JavaScript |
| URL input | ConvertUrl(url) | none: download the page and pass it as a stream with a base URI |
| NuGet packages | SelectPdf.Universal + one engine package per platform | itext, itext.bouncy-castle-adapter, itext.pdfhtml |
| Platforms | Windows (x64, x86), Linux (x64, ARM64), macOS on Apple Silicon | any platform .NET runs on (managed code only) |
| License | perpetual, from USD 499 | AGPL-3.0, or commercial (price on request) |
| Trying it | 30-day trial without a key (a "Demo Version" banner on each page); free Community Edition for HTML to PDF up to 5 pages | free under the AGPL; 30-day free trial |
Moving from iText mostly means replacing pdfHTML calls with HtmlToPdf and iText's layout objects with SelectPdf's page elements; both libraries measure in points. The sections below show where SelectPdf comes out ahead, how to migrate iText code to SelectPdf, and what each license means for your application.
Where SelectPdf is ahead.
Measurements from the 2026-10-15 run of the open pdf-benchmarks harness: iText 9.8.0 with pdfHTML 6.3.4 and SelectPdf.Universal 26.5.0 on the same machine.
| SelectPdf | iText | |
|---|---|---|
| HTML rendering | Chromium 154, runs JavaScript | own layout engine, no JavaScript |
| Published price | perpetual, from USD 499 | not published (quote); otherwise AGPL |
| Your source code under the AGPL | not required | required for free use, including network deployment |
| Fidelity to Chrome, mean SSIM | 0.984 | 0.782 |
| Content checks passed | 46 of 48 | 39 of 48 |
| PDF/A, PDF/UA and PDF/X levels valid | all 17 | 8 of the 10 it produces |
| Tagged structure checks (accessible PDFs) | 112 of 112 | 33 of 42 |
| Conversions a minute, 8 at once, Linux | 2,597 | 318 |
| Conversions a minute, 8 at once, Windows | 1,078 | 370 |
| Async conversion API | ConvertHtmlStringAsync, ConvertUrlAsync | none |
| Text extraction, lowest F1 | 0.97 | 0.18 |
| Also included | PDF to image, Word to PDF, ZUGFeRD / Factur-X | not included (PDF to image is the separate pdfRender, a command-line tool on .NET) |
Every number above, with the rest of the measurements, is in the full table below.
Migrate iText code to SelectPdf.
The same task in both libraries: a web page converted to PDF. pdfHTML has no URL input, so iText's own sample downloads the page and converts the bytes as a stream with a base URI. Install the library and the engine package for your platform:
dotnet add package SelectPdf.Universal dotnet add package SelectPdf.Universal.Native.win-x64
iText:
using iText.Html2pdf;
var url = "https://example.com/";
using var http = new HttpClient();
var page = await http.GetByteArrayAsync(url);
using var stream = new FileStream("page.pdf", FileMode.Create);
HtmlConverter.ConvertToPdf(new MemoryStream(page), stream,
new ConverterProperties().SetBaseUri(url));
SelectPdf:
using SelectPdf.Universal;
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl("https://example.com/");
doc.Save("page.pdf");
doc.Close();
Twelve tasks side by side, from hello world to headers and footers, merge, watermarks, forms, text extraction, signatures, PDF/A and an ASP.NET Core endpoint, each built and checked, are in the migration guide on GitHub.
Map iText APIs to SelectPdf.
Both libraries measure in points (1/72 inch). iText's origin is the bottom-left corner of the page; SelectPdf places elements from the top-left corner of the area inside the margins.
| iText | SelectPdf |
|---|---|
HtmlConverter.ConvertToPdf(html, stream) | new HtmlToPdf().ConvertHtmlString(html), then doc.Save(stream) |
ConverterProperties.SetBaseUri(uri) | ConvertHtmlString(html, baseUrl) |
download the page, then ConvertToPdf(stream, ...) | ConvertUrl(url) |
CSS @page margin boxes with counter(page), counter(pages) | Header / Footer with PdfTextSection and {page_number}, {total_pages} |
new PdfDocument(new PdfWriter(path)) + new Document(pdf) | new PdfDocument() + AddPage(), Save(path) |
document.Add(new Paragraph(text)) | page.Add(new PdfTextElement(x, y, text, font)) |
new PdfMerger(pdf).Merge(source, 1, n) | doc.Append(source) |
PdfCanvas + ShowTextAligned(...) for a watermark | a page template with a PdfTextElement |
PdfAcroForm.GetField(name).SetValue(value) | PdfFormManager with typed fields |
PdfTextExtractor.GetTextFromPage(page) | PdfToText.GetText(pageNumber) |
PdfSigner.SignDetached(...) with BouncyCastle | PdfDigitalSignatureElement on a page |
SetPdfAConformance(...) + an ICC output intent + an embeddable-fonts font provider | Options.PdfStandard = PdfStandard.PdfA2B |
The complete mapping is in the migration guide; every class is in the documentation.
iText and SelectPdf licensing.
| SelectPdf | iText | |
|---|---|---|
| Model | commercial, perpetual, 1 year of maintenance; renewal optional | dual: AGPL-3.0, or commercial |
| Entry license | Single Developer, USD 499 (1 developer, 1 deployment machine) | not published: OEM licenses priced per use case, the volume license an annual subscription priced on the number of PDF files |
| SaaS or software sold to customers | Single Developer OEM, USD 799 (unlimited deployment machines) | commercial license (quote) |
| Free use | Community Edition: HTML to PDF, up to 5 pages per document; 30-day trial | AGPL: your application's full source disclosed under the AGPL, the iText producer line kept in every PDF |
From iText's How to buy and AGPLv3 license pages on itextpdf.com and SelectPdf pricing, read 2026-10-16. One SelectPdf license covers SelectPdf.Universal and the classic Windows library; check both vendors' pages for current terms before buying.
The full measurement.
iText 9.8.0 with pdfHTML 6.3.4 and SelectPdf.Universal 26.5.0 on every axis of the 2026-10-15 run, on one machine under Windows and Linux, generated from the raw data. The method, per-page numbers and eight other .NET PDF libraries are on the results page; the harness is open source, so every number can be re-run.
| iText | SelectPdf | |
|---|---|---|
| HTML to PDF, geometric mean of 18 page medians, ms (Windows) | 183 | 212 |
| Pages converted faster than the other library (Windows) | 10 of 18 | 8 of 18 |
| Cold start, ms (Windows) | 617 | 714 |
| Throughput, conversions/min, 1 / 4 / 8 at once, sync (Windows) | 139 / 297 / 370 | 353 / 948 / 1,078 |
| Throughput, conversions/min, 1 / 4 / 8 at once, async (Windows) | not supported | 323 / 926 / 1,158 |
| Memory, one page / 8 at once, MB (Windows) | 172 / 645 | 205 / 467 |
| Memory over 1,000 conversions, MB (Windows) | 172 → 161, 0 failures | 140 → 156, 0 failures |
| Page that never loads: gives up after, s (Windows) | 100 | 60 |
| Parallel output equals sequential (Windows) | 16 / 16 | 32 / 32 |
| HTML to PDF, geometric mean of 18 page medians, ms (Linux) | 262 | 134 |
| Pages converted faster than the other library (Linux) | 1 of 18 | 17 of 18 |
| Cold start, ms (Linux) | 765 | 745 |
| Throughput, conversions/min, 1 / 4 / 8 at once, sync (Linux) | 136 / 304 / 318 | 619 / 1,929 / 2,597 |
| Throughput, conversions/min, 1 / 4 / 8 at once, async (Linux) | not supported | 603 / 1,872 / 2,639 |
| Memory, one page / 8 at once, MB (Linux) | 250 / 722 | 462 / 727 |
| Memory over 1,000 conversions, MB (Linux) | 221 → 227, 0 failures | 369 → 389, 0 failures |
| Page that never loads: gives up after, s (Linux) | 100 | 60 |
| Parallel output equals sequential (Linux) | 15 / 15 | 32 / 32 |
| Content checks passed (Windows) | 39 / 48 | 46 / 48 |
| Content checks passed (Linux) | 39 / 48 | 46 / 48 |
| Fidelity vs Chrome, mean SSIM (Windows) | 0.782 | 0.984 |
| PDF/A, PDF/UA, PDF/X: levels produced / valid (of 17) | 10 / 8 | 17 / 17 |
| Tagged structure checks | 33 / 42 | 112 / 112 |
| Text extraction, lowest F1 | 0.18 | 0.97 |
| Search | supported | supported |
| PDF to image | not supported | supported |
| Word to PDF | not supported | supported |
| Redaction | supported | supported |
| Merge | supported | supported |
| Split | supported | supported |
| Watermark | supported | supported |
| Digital signature | supported | supported |
| Form filling | supported | supported |
| ZUGFeRD / Factur-X | not supported | supported |
| Docker, minimal image (Linux) | runs, 84 MB | runs, 270 MB |
| Docker, vendor-documented image (Linux) | not needed (the minimal image runs) | not needed (the minimal image runs) |
| Publish size win-x64 / linux-x64, MB | 17.9 / 17.8 | 477.0 / 449.6 |
Linux, Docker and ARM64.
SelectPdf's engine package bundles the Chromium libraries, so a Docker image built from the official .NET images needs no apt-get lines and runs as root or as a non-root user. Linux x64 and ARM64 each have their own package; Linux needs glibc 2.30 or later (Debian 11+, Ubuntu 20.04+, RHEL 9+). On Alpine, the conversions run in the SelectPdf engine container. iText needs no native packages at all, so its images are smaller; the measured sizes are in the table above.
Step by step: HTML to PDF in Docker on Linux. Both libraries' Dockerfiles are side by side in the C# PDF libraries comparison.
Questions, answered.
Something else? Write to support@selectpdf.com with your settings and, if you can, the HTML.