Hi Lauritz,
Tough one - it deserves a longer answer because it comes up in most DW9 to DW10 migrations.
First, two different problems are being discussed in this thread. Adrian needs to render an existing PDF as an image (thumbnails for DAP/Publications). The browser does that with PDF.js and the server only serves the file. You need to produce a new PDF from data (invoices, packing slips). That is the harder one, and it is where DW9 spent most of its weight.
Why DW10 has no server-side PDF engine
The DW9 renderer was a headless Chrome. It accounted for the majority of the application download, and it was the source of a disproportionate number of support cases. The reasons we did not carry it over:
Security. HTML-to-PDF means running a full browser engine on the server and feeding it HTML that contains customer data and often user-supplied content. A browser follows links. <img src="http://169.254.169.254/..."> or a file:// reference in a product description means the renderer can reach internal endpoints and local files and write the result into the PDF. Chromium also has a weekly patch cadence; a pinned browser binary inside a CMS is a liability the moment it is a few months old.
Unmanaged code. Chromium, PDFium, Skia and similar are native libraries loaded into the .NET process. A crash in native code is not an exception you can catch; it takes the whole process down, including every other request in flight. Memory is allocated outside the GC, so leaks are invisible to .NET diagnostics. The binaries have to be extracted to disk, which needs write access to a temp folder, and they need system libraries (fontconfig, libX11, GTK and friends on Linux) that must be present on the host. On DW Cloud, where the standard application is auto-upgraded and customizations are kept separate, there is no way to isolate that failure mode.
Cross platform. DW10 runs on Windows, Linux, Mac. A native dependency like IronPDF means shipping and testing all those builds, each with its own set of system dependencies. I giant download with loading and upgrade issues. (Technical, I know, but important for customer stability)
Licensing. IronPDF is a commercial product. For DW9 we have a license that covers creating PDF in the product - if you use the API directly or indirectly it is a license issue. This is not DW10 specific but the usage you describe is a breach, others do it, and then it becomes our problem as well.
Rendering fidelity. Web fonts not installed on the server fall back silently. The viewport width the renderer uses decides the layout, so the PDF does not look like the preview in the browser. Lazy-loaded images never load. Content rendered by JavaScript is missing if the snapshot is taken too early. Page breaks depend on CSS support that varies by engine version. Page numbers in headers and footers are a workaround in every engine. Each of those becomes a ticket titled "the PDF looks different from the website", and none of them are bugs we can fix in the platform. We have spent a ton of time on this.
IronPDF in DW10
None of the above stops you from using IronPDF in a DW10 custom project. It is a NuGet package, not a DW feature - we just do not use it anymore. If you want to use it, you can reference IronPDF in your ustom project - then you own the caveats above: native dependencies in your deployment, memory and stability in the app pool, the license question, and rendering support. I would not run it in-process on DW Cloud.
Alternatives
The important distinction is between two ways of getting a PDF:
- HTML to PDF: render a web page with a browser engine and print it. High visual fidelity, needs Chromium or equivalent somewhere, and inherits every issue listed above wherever that engine runs.
- Generating a PDF: build the document programmatically from data. No html, no browser, managed code only, deterministic output. Less flexible for design, but invoices and packing slips are not design-heavy.
For invoices and packing slips I would start with option 2 - or see below.
PDFsharp (with MigraDoc): MIT-licensed, pure managed code, no native binaries, no Chromium, targets current .NET. PDFsharp is a low-level canvas where you position text, lines and images yourself. PDFsharp-MigraDoc adds a document model (paragraphs, tables, headers/footers, pagination) on top. Use the first for fixed layouts like labels and simple invoices, the second when content flows across pages. One cross-platform note: on Linux you must provide a font resolver or embed fonts, since there is no GDI to look them up.
csharp
using PdfSharp.Drawing;
using PdfSharp.Pdf;
var document = new PdfDocument();
document.Info.Title = "Invoice 1001";
var page = document.AddPage();
page.Size = PdfSharp.PageSize.A4;
var gfx = XGraphics.FromPdfPage(page);
var title = new XFont("Arial", 20, XFontStyleEx.Bold);
var body = new XFont("Arial", 11);
gfx.DrawString("Invoice 1001", title, XBrushes.Black,
new XRect(40, 40, page.Width.Point - 80, 30), XStringFormats.TopLeft);
double y = 100;
foreach (var line in orderLines)
{
gfx.DrawString(line.ProductName, body, XBrushes.Black, 40, y);
gfx.DrawString(line.Quantity.ToString(), body, XBrushes.Black, 350, y);
gfx.DrawString(line.Total.ToString("C"), body, XBrushes.Black, 450, y);
y += 18;
}
document.Save(stream);
If you genuinely need HTML rendering, for example because the customer wants the PDF to match a designed web page, do not use a PDF component on the server - use a service instead:
Hosted HTML-to-PDF APIs: your .NET side becomes one HTTP call and zero rendering dependencies. It just runs on someone else's infrastructure. Chromium-backed options include PDFShift (simplest integration), API2PDF (pay per use, good for spiky volume), PDFCrowd and ConvertAPI. For typographically serious documents with real CSS Paged Media support, DocRaptor (PrinceXML) and PdfBroker.io (WeasyPrint, EU-hosted, produces PDF/A and PDF/UA) are the options. EU hosting will matter for many Danish customers.
csharp
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes("api:" + apiKey)));
var payload = JsonSerializer.Serialize(new { source = invoiceHtml, format = "A4" });
var response = await http.PostAsync("https://api.pdfshift.io/v3/convert/pdf",
new StringContent(payload, Encoding.UTF8, "application/json"));
response.EnsureSuccessStatusCode();
var pdfBytes = await response.Content.ReadAsByteArrayAsync();
Two cautions. Avoid any service whose only engine is wkhtmltopdf; it was archived in 2023 with unpatched CVEs (Security issues). And check the per-conversion price against your real volume. Order confirmations across a customer base add up quickly.
Is PDF even the right tool?
Before choosing any of the above, ask why the customer wants a PDF. The usual answer is "for the invoice", but an invoice is data plus a layout, and an email already is that. An HTML email can be printed, it is readable on a phone, and it removes the click to open a PDF attachment. A QR code for payment, a tracking link, a return label, all of it embeds directly in the email. In most cases the PDF requirement is a habit carried over from a time when email clients could not render a table properly. If the requirement is legal archiving or a fixed document the ERP must own, the ERP already produces it and DW should link to it. If it is "the customer wants something to print", a well-built email does that better and with none of the engineering above.
NP