Comparisons

Weblitz and wkhtmltopdf, DinkToPdf and Rotativa

wkhtmltopdf's repository was archived by its owner on 2 January 2023, and DinkToPdf and Rotativa still run it. Weblitz is maintained, prints with today's CSS and runs the page's JavaScript as Chrome does.

Facts from its own pages read 2026-11-20

Their own pages: wkhtmltopdfDinkToPdfRotativa

wkhtmltopdf
Its repository archived by its owner on 2 January 2023; its last release 0.12.6, of 10 June 2020; LGPL-3.0 (github.com/wkhtmltopdf)
DinkToPdf
1.0.8, MIT: "a .NET Core P/Invoke wrapper for wkhtmltopdf library that uses Webkit engine"; its repository carries wkhtmltopdf 0.12.4's native library (nuget.org and its README)
Rotativa.AspNetCore
1.5.0: "Rotativa uses wkhtmltopdf/wkhtmltoimage behind the scenes" (its README)

Not timed yet: DinkToPdf's native libraries are x86 builds, which .NET on our ARM Mac cannot load. Our Linux x64 run will time it beside Weblitz.

What wkhtmltopdf, DinkToPdf and Rotativa does better

  • It is free (wkhtmltopdf LGPL-3.0, DinkToPdf MIT), one program, and long used: DinkToPdf alone has more than 33 million downloads on nuget.org. source

Moving from wkhtmltopdf, DinkToPdf and Rotativa

One HTML page to PDF bytes, before and after. Weblitz's options carry Puppeteer's page.pdf() names; nothing to download, start or keep alive.

DinkToPdf
using DinkToPdf;

var converter = new SynchronizedConverter(new PdfTools());
var document = new HtmlToPdfDocument
{
    GlobalSettings = { PaperSize = PaperKind.A4 },
    Objects = { new ObjectSettings { HtmlContent = html } },
};
byte[] pdf = converter.Convert(document);
Weblitz
using WeblitzPdf;

var pdf = HtmlToPdf.Render(html, new HtmlPdfOptions
{
    Format = "A4",
    PrintBackground = true,
    Margin = new HtmlMargins(Top: "20mm", Bottom: "20mm"),
}).Pdf;
dotnet add package WeblitzPdf --prerelease