HTML-to-PDF for .NET, Node.js and Python · Release candidate
HTML to PDF, printed like Chrome. No browser inside.
Turn HTML, CSS and JavaScript into PDFs from .NET, Node.js or Python. No Chromium to ship, start or keep alive.
- On NuGet: WeblitzPdf 2.0.0-rc.2; on npm: weblitzpdf 2.0.0-rc.2; on PyPI: weblitz 2.0.0rc2; in its Maven repository: com.weblitzpdf:weblitzpdf 2.0.0-rc.2. Prereleases, free to try.
- Own .NET layout and PDF engine. V8 for JavaScript.
- From the makers of SSRS2, the RDLC report engine. One licence covers both.
Same HTML. Two PDF outputs. Move the divider to compare.

This page's picture did not load. The PDFs below show both outputs.
Your first PDF
HTML in. PDF bytes out.
dotnet add package WeblitzPdf --prerelease
A prerelease: WeblitzPdf 2.0.0-rc.2 on NuGet, for .NET 8, 9, 10 and 11.
using WeblitzPdf;
var result = HtmlToPdf.Render("<h1>Invoice 42</h1><p>...</p>");
File.WriteAllBytes("invoice.pdf", result.Pdf!);
using WeblitzPdf;
// Its CSS, pictures, fonts and scripts are read from its folder, never outside it
var letters = HtmlToPdf.RenderFile("templates/letters.html", new HtmlPdfOptions
{
Format = "A4",
Margin = new HtmlMargins("18mm", "18mm", "20mm", "20mm"),
});
File.WriteAllBytes("letters.pdf", letters.Pdf!);
using WeblitzPdf;
app.MapGet("/invoices/{id}.pdf", async (int id, InvoiceViews views) =>
{
var result = HtmlToPdf.Render(await views.Html(id), new HtmlPdfOptions { PrintBackground = true });
return Results.File(result.Pdf!, "application/pdf");
});
npm install weblitzpdf
A prerelease: weblitzpdf 2.0.0-rc.2 on npm, for Node.js 22 or later, on Linux with glibc (x64, Arm64), macOS (Arm64, x64) and Windows (x64, Arm64). npm installs the engine for your platform only, with the runtime it needs: nothing else to install.
import { writeFile } from 'node:fs/promises';
import { renderHtml, renderUrl } from 'weblitzpdf';
const result = await renderHtml('<h1>Invoice 42</h1><p>...</p>', { format: 'A4', printBackground: true });
await writeFile('invoice.pdf', result.file);
// A web page, after its scripts ran
await renderUrl('https://example.com/report', { path: 'report.pdf' });
The options are Puppeteer's page.pdf() options under their own names. Weblitz from Node.js
pip install --pre weblitz
A prerelease: weblitz 2.0.0rc2 on PyPI, for Python 3.9 or later, on Linux with glibc (x64, Arm64), macOS (Arm64, x64) and Windows (x64, Arm64). The wheel carries the engine and the runtime it needs: nothing else to install.
import weblitz
result = weblitz.render_html("<h1>Invoice 42</h1><p>...</p>", format="A4", print_background=True)
result.save("invoice.pdf")
# A web page, after its scripts ran
weblitz.render_url("https://example.com/report", path="report.pdf")
The options are Playwright's page.pdf() options under their Python names; weblitz.AsyncEngine is the same for asyncio. Weblitz from Python
<repository><id>weblitzpdf</id><url>https://maven.weblitzpdf.com</url></repository>
<dependency><groupId>com.weblitzpdf</groupId><artifactId>weblitzpdf</artifactId><version>2.0.0-rc.2</version></dependency>
A prerelease: com.weblitzpdf:weblitzpdf 2.0.0-rc.2 in Weblitz's Maven repository, for Java 17 or later, on Linux with glibc (x64, Arm64), macOS (Arm64, x64) and Windows (x64, Arm64). Maven adds the engine for your platform, with the runtime it needs: nothing else to install.
import com.weblitzpdf.*;
import java.nio.file.Path;
Result result = Weblitz.renderHtml("<h1>Invoice 42</h1><p>...</p>",
new HtmlOptions().setFormat("A4").setPrintBackground(true));
result.save(Path.of("invoice.pdf"));
// A web page, after its scripts ran
Weblitz.renderUrl("https://example.com/report", new HtmlOptions().setPath(Path.of("report.pdf")));
The options are Playwright's Page.PdfOptions under the same names; every method has an ...Async twin. Weblitz from Java
Any language with an HTTP client: the server's Docker image, ghcr.io/antoinegou/weblitz-server:2.0.0-rc.2, for linux/amd64 and linux/arm64.
docker run --rm -p 8080:8080 -e SSRS2_LICENSE ghcr.io/antoinegou/weblitz-server:2.0.0-rc.2
curl -H 'Content-Type: application/json' \
-d '{"html": "<h1>Invoice 42</h1>", "options": {"format": "A4", "printBackground": true}}' \
http://localhost:8080/v1/html -o invoice.pdf
The same options, and the file's pages and notes in its headers. The HTTP server
Without a licence key, every page carries a trial watermark.
Chrome-like printing. A different engine.
Weblitz lays out the page and writes the PDF in your .NET process. From Node.js and Python it runs the same engine in worker processes the package starts and keeps warm. Your page's JavaScript runs in V8. There is no Chromium browser to install or start.
Pages are printed, not browsed. No clicking or typing. Pages behind a login print with the headers, tokens or cookies you give them.
Your .NET process, or the Node.js or Python package's worker
What it prints
Layout
Blocks, inline text, floats, positioning, tables, flexbox, grid, multi-column, writing modes, transforms, filters and masks, as Chrome lays them out.
Paged media
@page sizes and margins, margin boxes for headers, footers and page numbers, page breaks, orphans and widows, table headers on each page; Puppeteer's header and footer templates.
Fonts and scripts
Web fonts; right to left (Arabic, Hebrew, Persian); shaped scripts (Arabic, the Indic scripts, Thai); Chinese, Japanese and Korean; emoji.
Graphics
SVG, PNG, JPEG, WebP, GIF, AVIF, gradients, shadows, canvas.
The PDF
Searchable, copyable text; links; title and author; passwords and permissions; PDF/A.
The page's scripts run once before printing: they see the page at the size of the paper, then it prints as Chrome's "Save as PDF" does (beforeprint, print media, afterprint). Content a page loads as it comes into view prints too: lazy content. A page from the web can print without its consent boxes and without its advertisements and trackers, when you ask for it: two options, and nothing is clicked.
Not only PDF: Excel, Word and PowerPoint
The same page, loaded the same way, as an Office file: its data tables as an Excel workbook whose numbers are numbers, its content as a Word document to go on writing in, its printed pages as PowerPoint slides whose text is text. No Office on the machine. First versions, since 2.0.0-beta.7.
Made for servers
In your application
Rendering runs in your process (from Node.js and Python, in the package's own workers), with no conversion service to call. A file's own folder only, and the network only for what you allow. Thread-safe: one call per document, on as many threads as you use; a fixed clock, time zone and locale give identical files run after run.
Windows, Linux and macOS
.NET 8, 9, 10 and 11, x64 and ARM64, in containers and the cloud alike. On Alpine, add the gcompat package: the script engine is built for glibc. From Node.js 22 or later, Python 3.9 or later and Java 17 or later: Linux with glibc (x64, Arm64), macOS (Arm64, x64) and Windows (x64, Arm64) (not Alpine yet); a Docker image for every other language. Fonts for Arial, Calibri, Cambria, Segoe UI and more come with the package; the fonts guide has the commands for other scripts in a container.
Azure App Service on Windows
Tested on Azure App Service for Windows, Basic B1. measured 2026-11-06 The 17 bench documents and a Chart.js page score there what they score on our Mac, page for page. The check
Printing pages you don't control? Limits on scripts' time and memory, documents, pictures and files are built in; run untrusted HTML in an isolated process or container as well: network and security.
Inspect the output. Read the measurements.
Compare our PDFs with Chrome's, inspect the source documents, and read how the measurements were made.
-
An invoice
100% measured 2026-11-19
Beside Chrome 156's PDF: pages, every box, every line, the text.
-
A Chart.js report
100% measured 2026-11-19
Beside Chrome 156's PDF: pages, every box, every line, the text.
-
International text: Arabic, Hebrew, Thai, Hindi, Chinese, Japanese, emoji
100% measured 2026-11-19
Beside Chrome 156's PDF: pages, every box, every line, the text.
Beside the other HTML to PDF libraries scores measured 2026-11-19 times and sizes 2026-11-25
Weblitz's own measurements, on the same 17 documents and the same Mac.
| Weblitz | The libraries that ship Chromium | |
|---|---|---|
| Score beside Chrome 156's PDF | 99.9% | 99.1–99.2% |
| A one-page PDF | 1.4 ms | 81.4–417 ms |
| Engine on a Linux server | 119 MB | 384–695 MB |
| Docker image (Weblitz; Puppeteer's and Playwright's own) | 330 MB | 2.05 GB, 3.59 GB |
The libraries that ship Chromium: Syncfusion HTML-to-PDF, HiQPdf Next, SelectPdf, EVO HTML to PDF Next, each in its trial or evaluation mode. Puppeteer with Chrome, the reference, takes 12.2 ms a page and 441 MB. Every version, condition and disclosure: the full table. Weblitz's score above is the same tool's as theirs; its own bench gives it 100% on the bench's box-by-box comparison with Chrome's own PDFs.
See all benchmarks and methodology
Also on that page: the web's own tests: complete in every area, measured 2026-11-08 · every library's scores, times and sizes · Azure App Service
One licence. Two engines.
Weblitz is included in the SSRS2 licence, alongside the SSRS2 report engine. One key for both.
USD 799 a year per company, or USD 1,999 for three years, excluding tax. Unlimited developers, servers and documents. A key keeps working with the versions released while it ran. Your price is locked for as long as your licence keeps renewing.
Company licences of the libraries that ship Chromium cost USD 1,095 to 1,599. Compare prices.
Without a key, every page carries a trial watermark: the whole engine can be tried for free.
Questions
- Is there a browser inside?
- No. The layout, the fonts and the PDF are Weblitz's own .NET code. Scripts run in V8, Chrome's JavaScript engine, built into the package.
- Will it print the same as Chrome?
- That is what it is built and measured for, document by document: the measurements. Pages that need a user's clicks or typing are outside its scope.
- Does it run JavaScript?
- Yes, once, before printing: React apps, Chart.js charts and pages that build themselves from their data.
- Can I move from Puppeteer?
- From Node.js, the options are Puppeteer's
page.pdf()options under their own names (format,margin...); from Python, Playwright's. In .NET they carry the same names:Format,Margin,Landscape,Scale,PrintBackground,PageRanges,HeaderTemplate,FooterTemplate. Try your own pages with the release candidate. - How do I try it?
- Add the package:
dotnet add package WeblitzPdf --prerelease(WeblitzPdf 2.0.0-rc.2),npm install weblitzpdf(weblitzpdf 2.0.0-rc.2) orpip install --pre weblitz(weblitz 2.0.0rc2): prereleases of 2.0. Without a licence key, every page carries a trial watermark; a key takes it off. The first steps: getting started.
Try it with the documents you print.
Install the release candidate from NuGet, npm or PyPI. Free to try, with a trial watermark until you add a key.