html2pdf.js runs in the browser and relies on html2canvas, which rasterizes DOM elements — resulting in blurry text and broken layouts. PixDoc renders server-side with a real browser engine for crisp, reliable output.
| Feature | PixDoc | html2pdf.js |
|---|---|---|
| Setup | API key, one HTTP call | npm install, client-side script |
| Rendering Engine | Chromium (server-side) | html2canvas + jsPDF (client-side) |
| CSS Support | Full CSS3, web fonts, flexbox, grid | Partial — many CSS properties unsupported |
| Scaling | Server-side, consistent results | Runs in user's browser, varies by device |
| Templates | Built-in template engine with variables | None |
| Screenshots | Built-in endpoint for PNG/JPEG/WebP | Canvas-based screenshot only |
| Output Quality | Vector text, sharp at any zoom | Rasterized text, blurry when zoomed |
| Pricing | Flat $29/mo for 5,000 renders | Free and open source |
See how much simpler it is to generate a PDF with PixDoc.
import html2pdf from "html2pdf.js";
const element = document.getElementById("invoice");
const opt = {
margin: 10,
filename: "invoice.pdf",
image: { type: "jpeg", quality: 0.98 },
html2canvas: { scale: 2, useCORS: true },
jsPDF: { unit: "mm", format: "a4", orientation: "portrait" },
};
html2pdf().set(opt).from(element).save();
// Runs client-side — output varies by browser/device
// Text is rasterized, not selectable in the PDFconst res = await fetch("https://pixdoc.dev/api/v1/pdf", {
method: "POST",
headers: {
Authorization: "Bearer pd_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({ html: "<h1>Invoice #1042</h1>" }),
});
const pdf = await res.arrayBuffer();Start generating PDFs, screenshots, and OG images in minutes. No browser management, no infrastructure, no per-document fees.