JavaScript PDF generator
Writing the PDF bytes is the easy part, and every library in this space does it. The job is everything before that. It decides where page two starts, repeats the table header across the break, and keeps a total with the rows it totals. It also embeds the faces, so the file reads the same on a machine that has never heard of your fonts. That’s typesetting, and it’s what you’re really choosing between.
quario takes a different position on where the report lives. It’s a definition — JSON you store, version and review — rather than a sequence of drawing calls or a template that builds markup. If you would rather see that end to end with your own data, JSON to PDF is the walkthrough.
Why not just build the PDF by hand?
The common routes are drawing the PDF coordinate-by-coordinate (jsPDF, PDFKit) or hand-templating HTML strings. Both work until the layout changes — then you’re editing pixel offsets or debugging broken markup. With quario the report is data. It’s declarative, so a table that grows or a field that moves is a change to a definition, not a rewrite. And because quario renders without eval or code generation, your untrusted data never becomes executable — no CSP exceptions, no injection surface. More on that →
Runs where your code runs
The same definition renders in Node, the browser, edge functions, or a worker. Generate the invoice on the server for the PDF, preview it live in the browser — one source of truth, no build step.
FAQ
Can quario output a PDF directly?
Yes. @quario/pdf typesets and writes the file itself — pagination, repeated table headers, embedded fonts, a document outline — with no headless browser involved. The HTML-plus-print route stays available when you want full CSS typography.
How big is it?
The engine is under 5 kB minified and compressed. Each render target adds a little of its own on top — around 1 kB for HTML, 5 kB for PDF. The PDF target also leans on a file writer.
Can I use it for free?
Evaluating it’s free and has no time limit — the full engine, no key to request — and evaluation output carries a watermark. Anything past evaluating it, including shipping it in an application or running it in your business, needs a seat per developer. Deployment is then unlimited and royalty-free, however many servers or users you have. See pricing →