Rotativa alternative
Rotativa Alternative for ASP.NET Core and DinkToPdf Projects
Replace the Rotativa folder and the DinkToPdf native library with one HTTP call from your controller. Your Razor view renders in managed Chromium, so flexbox, grid, web fonts and JavaScript charts come out the way they look in the browser, and nothing from wkhtmltopdf ships in your container. Try it on any URL or HTML below.
- PDF and archive in one call
- Plans from $49 a month
- Your HTML stays yours
Live demo
Runs in your browser. Nothing is uploaded. One PDF free to try, then a plan.
Your HTML
Live preview
Your PDF is downloading. That was the free one. The Starter plan converts as many as you need, for $49 a month or $288 a year, half price.
See the planShort answer
The practical Rotativa alternative for ASP.NET Core keeps your Razor views and swaps the engine. Rotativa.AspNetCore and DinkToPdf both drive wkhtmltopdf, a project archived in 2023 whose last release is 0.12.6 from June 2020, so they inherit its old WebKit layout and an unpatched SSRF flaw. Render the view to an HTML string, POST it to SitePDF, and you get a Chromium accurate PDF with headers, footers and page numbers, plus an optional dated archive of each document. Plans start at $49 a month for 10,000 renders.
Written and fact checked by the SitePDF team.
Five ways out of Rotativa and DinkToPdf side by side
Every route keeps your data model. They differ on the engine that lays out the page, what you must ship inside your app, and whether the Razor views you already have survive the move.
| Option | Engine | What ships with your app | Where it hurts | Best for |
|---|---|---|---|---|
| Stay on Rotativa.AspNetCore or DinkToPdf | wkhtmltopdf 0.12.6, old Qt WebKit | The wkhtmltopdf binary or libwkhtmltox for every OS you deploy to | No flexbox or grid, unreliable JavaScript, CVE-2022-35583 with no fixed release | Internal reports on trusted HTML that already print correctly |
| PuppeteerSharp or Playwright for .NET | Current Chromium | A Chromium build of a few hundred MB plus its Linux libraries | Memory per page, browser crashes and pool sizing become your job | Teams that must keep every byte of HTML on their own servers |
| QuestPDF | Its own C# layout engine | A managed NuGet package, no browser | You rebuild every document in C# code, your Razor views are not reused | New documents designed from scratch by developers |
| IronPDF or another commercial library | Embedded Chromium | A large native package and a license key per deployment | Per developer license cost and the same container weight as a browser | Offline or desktop apps that cannot call out |
| SitePDF rendering API | Managed current Chromium | Nothing, one HttpClient call | HTML leaves your network for the render, and each render counts toward a plan | Web apps on Linux, Docker or Azure App Service that print invoices, statements and reports |
The honest read: if your Rotativa PDFs are simple tables, nobody outside your company writes the HTML, and you deploy to one Windows server, there is no emergency and you can leave it. The move pays off when you containerize, when a designer asks for a flexbox layout, when user content reaches the template, or when a security review flags the CVE. Our C# PDF library comparison covers the free .NET options in more depth.
Why Rotativa and DinkToPdf break when you move to Linux and Docker
Rotativa.AspNetCore is a thin wrapper. Its README asks you to put wkhtmltopdf.exe in a folder named Rotativa under the web root (no extension on Linux and macOS) and call app.UseRotativa(). The package is still maintained, with version 1.5.0 published on NuGet in October 2026, but the binary it runs is not. DinkToPdf goes one step deeper and loads the native libwkhtmltox library into your process. Its last release, 1.0.8, is from April 2017 and targets .NET Standard 1.6, as its NuGet listing shows.
That is why the trouble starts on deploy, not on your laptop. The official .NET container images do not include wkhtmltopdf or the font and rendering libraries it needs, so the first request fails with a missing shared library or prints boxes instead of text. DinkToPdf adds its own trap: the converter is not thread safe, so it has to be a singleton SynchronizedConverter, and every PDF in the app queues behind one lock. Teams usually find this when month end invoices pile up. The same engine sits under PHP, Python and Ruby wrappers, which our wkhtmltopdf alternative page walks through.
The security finding that ends most Rotativa reviews
In 2022 researchers published CVE-2022-35583, a server side request forgery in wkhtmltopdf 0.12.6. HTML handed to the converter can make it fetch internal addresses, such as a cloud metadata endpoint, and print the response into the PDF. Because the project was archived, there is no patched version to upgrade to. If a customer name, a note field or an uploaded logo URL reaches your Razor view unescaped, a scanner will flag the dependency and an auditor will ask how you isolate it. Rotativa and DinkToPdf cannot answer that by themselves, because they are the vulnerable process.
Moving a ViewAsPdf action to an API call
The migration is smaller than it looks because your Razor views stay. Rotativa's ViewAsPdf does two things: it renders the view to HTML and it hands that HTML to wkhtmltopdf. You keep the first half and replace the second.
- Render the view to a string. Use a small
IRazorViewEnginehelper, the common RazorViewToStringRenderer pattern, so the controller gets the finished HTML ofInvoice.cshtmlwith its model. - Make assets absolute. wkhtmltopdf read files from disk. A remote renderer needs full URLs for CSS, images and fonts, or inline them. This one change fixes most first-try differences.
- Map the options.
PageSizebecomesformat,PageMarginsbecomesmargin, andCustomSwitchesfor headers and footers becomeheader_htmlandfooter_html, where thepageNumberandtotalPagesclasses print page numbers. Our margins, headers and footers guide has the details. - Return the file. Stream the returned PDF to the browser with
File(bytes, "application/pdf"), or store the link. Remove theRotativafolder and the native library from the image. - Run both for a week. Print the same records through both paths, compare the PDFs, then delete the old call.
Blazor teams use the same approach with a component rendered to HTML, explained on the Blazor HTML to PDF page.
A worked example with 8,000 invoices a month
Take one ASP.NET Core app on Linux that prints 8,000 two page invoices a month, most of them in the first three business days. On DinkToPdf with a singleton converter at roughly 1.5 seconds per document, the month end batch of 6,000 invoices is 2.5 hours of serialized work on one instance before any retries. These are planning assumptions, so time your own template before you size anything.
Moving to PuppeteerSharp removes the lock but adds a browser to the image and a page pool to tune, and the PuppeteerSharp deployment guide for Azure and Docker lists the libraries and fonts that image needs. Moving to an API removes both: 8,000 renders fit the Starter API plan at $49 a month or $288 a year, and three concurrent renders clear the same 6,000 invoice batch in under an hour at the same 1.5 seconds. At 50,000 renders the Growth plan is $99 a month or $588 a year with 10 concurrent renders. Add archive: true on invoices and statements and you also keep a timestamped copy of exactly what each customer received, which helps when someone disputes a total. See the pricing page for every tier.
When to stay on Rotativa, and when a library beats an API
Stay where you are if the app runs on Windows, the HTML is fully under your control, the layouts print correctly today and nobody has asked for modern CSS. Pick QuestPDF when developers design the documents and you would rather write C# than HTML. Pick a commercial library when PDFs must be produced offline or inside a desktop app, and read our IronPDF pricing breakdown before you budget per developer seats, or the iText and .NET library license costs if AGPL terms are on your list. Pick a rendering API when you deploy to containers or App Service, when templates are already HTML and CSS, and when you want a record of each document without building one.
using System.Net.Http.Headers;
using System.Net.Http.Json;
// before: return new ViewAsPdf("Invoice", model) { PageSize = Size.Letter };
public async Task<IActionResult> InvoicePdf(int id)
{
var model = await _invoices.GetAsync(id);
string html = await _razor.RenderViewToStringAsync("Invoice", model);
var res = await _http.PostAsJsonAsync("https://api.sitepdf.com/v1/render", new
{
html,
format = "Letter",
margin = "18mm",
footer_html = "<div style='font-size:9px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></div>",
archive = true
});
res.EnsureSuccessStatusCode();
// { "pdf_url": ".../v1/documents/doc_r8k2m.pdf", "pages": 2,
// "archive": { "id": "arc_r5t1q", "captured_at": "2026-11-17T08:41:09Z" } }
var doc = await res.Content.ReadFromJsonAsync<RenderResult>();
var pdf = await _http.GetByteArrayAsync(doc!.pdf_url);
return File(pdf, "application/pdf", $"invoice-{id}.pdf");
}
This is the documented API call shape. Full request and response walkthrough.
Questions about this job
Does Rotativa work with ASP.NET Core?
Is DinkToPdf still maintained?
What can I use instead of Rotativa in .NET 8?
Why does Rotativa fail on Linux or in Docker?
How much does a Rotativa replacement cost?
Index
More PDF and archiving tools
- Convert HTML to PDF
- Webpage to PDF
- URL to PDF API
- Website archiving
- Monitor website changes
- Screenshot API
- React to PDF
- Java PDF library
- C# PDF library
- Python PDF generation
- HTML to PDF Node.js
- Laravel HTML to PDF
- Vue to PDF
- Next.js PDF generator
- Angular to PDF
- Markdown to PDF API
- Django HTML to PDF
- Blazor HTML to PDF
- Spring Boot HTML to PDF
- Airtable to PDF
- Svelte to PDF
- Zapier and Make HTML to PDF
- Golang HTML to PDF
- Rails HTML to PDF
- PDF generator API
- Website archiving software
- Document generation API
- Legal document automation software
- Document automation software
- Bulk HTML to PDF
- Accessible PDF generation
- ADA compliance audit cost
- 508 compliance testing
- PDF remediation
- VPAT and ACR
- PDF accessibility checker
- Wayback Machine alternative
- Best HTML to PDF API
- DocRaptor alternative
- Puppeteer alternative
- Wkhtmltopdf alternative
- PDFShift pricing and alternative
- Urlbox pricing and alternative
- PDFCrowd alternative
- Api2Pdf alternative
- Browserless alternative
- APITemplate alternative
- CraftMyPDF alternative
- PDFMonkey alternative
- dompdf alternative
- WeasyPrint alternative
- jsPDF alternative
- mPDF alternative
- Website archiving pricing comparison
- HTML to PDF API for ecommerce
- HTML to PDF API for SaaS
- HTML to PDF API for accounting software
- PHP convert HTML to PDF
- PrinceXML alternative
- PDFreactor alternative
- PDF integrity check
- Invoice PDF archive
- PDF page numbers, headers and footers
- PDF of pages behind a login
- Website archiving for law firms
- React PDF renderer alternative
- Gotenberg alternative
- GrabzIt alternative
- Adobe PDF Services API
- PDF SDK pricing
- HTML to image API pricing
- Adobe Document Generation API pricing
- jsreport pricing
- PDFBolt pricing
- PDFEndpoint pricing
- Formstack Documents pricing
- Documint pricing
- iLovePDF API pricing
- Browserless pricing
- PandaDoc API pricing
- CloudConvert API pricing
- Encodian pricing
- IronPDF pricing
- Salesforce document generation pricing
- Winnovative pricing
- SelectPdf, HiQPdf and EvoPdf pricing
- CloudConvert alternative
- Direct mail API pricing
- E-signature API pricing
- Sparticuz Chromium Lambda cost
- Browserbase pricing
- Aspose PDF pricing
- PDF API pricing
- How it works
- Features
- Pricing
Get started
Render and archive with one API call
A pixel perfect PDF and a dated copy of the page from the same request. Plans from $49 a month, half price billed yearly.