HTML to PDF with native, selectable text.
An open-source, browser-first HTML-to-PDF library for JavaScript and TypeScript. Create searchable PDFs with native text and supported vector graphics via Zig and WebAssembly—without a headless browser or screenshot pipeline.
PDF/A-3u complianceArchival PDFs with embedded files. Available in source. Read the guide.npm install @imggion/html2realpdfInvoice #0042 · Jul 15, 2026
Design systems
that ship.
Selectable text. Search it, copy it, feed it to your tools. No OCR required.
Try the difference yourself.
One three-page analytics report, two PDF engines. Download both files or preview every page here, then test the text, tables, and vector charts.
QUARTERLY BUSINESS REVIEW
Northstar Commerce Analytics
Executive performance report — Q2 2026
| NET REVENUE€4.82M+18.4% YoY | GROSS MARGIN64.2%+3.1 pts | ACTIVE CUSTOMERS28,640+11.8% | CHURN2.7%+0.3 pts |
Revenue trend
Executive insight: Revenue acceleration was driven by enterprise expansion and a 9% increase in average order value.
Regional performance
| Region | Revenue | YoY growth | Gross margin | Signal |
|---|---|---|---|---|
| United Kingdom | €1.54M | +22.6% | 66.8% | Strong |
| DACH | €1.21M | +19.4% | 65.1% | Strong |
| France | €0.86M | +13.2% | 62.7% | Stable |
| Southern Europe | €0.71M | +8.1% | 59.9% | Watch |
| Nordics | €0.50M | +16.7% | 64.5% | Stable |
Customer mix
Appendix and methodology
Revenue recognition: Net revenue excludes VAT, refunds, marketplace fees, and promotional credits. Subscription revenue is recognized daily over the contracted service period.
Customer definitions: Active customers completed at least one paid transaction during the trailing 90-day period. Churn represents customers becoming inactive during the quarter divided by active customers at quarter start.
Data quality: Figures reconcile to the management ledger as of 8 July 2026. Currency conversion uses the European Central Bank monthly average rate for each transaction month.
| Metric | Source | Refresh cadence | Owner |
|---|---|---|---|
| Revenue and margin | Finance warehouse | Daily | Finance Operations |
| Customer activity | Product analytics | Hourly | Data Platform |
| Regional attribution | Billing profile | Daily | Commercial Analytics |
Real PDF
A PDF should be a document, not a picture of one.
Canvas-based HTML-to-PDF tools flatten the page into pixels. html2realpdf preserves the parts that make PDF useful: text, links, fonts, layout, and supported vector graphics.
Looks like text.
But the page is a large image. Selection, search, copy, and machine reading need extra work.
Works like text.
Unicode mappings keep content searchable and copyable. Supported graphics remain vectors.
Native PDF vs. screenshot PDF
The visual difference can be subtle at 100%. The document-model difference is not.
html2realpdf vs. html2pdf.js benchmark
In one deterministic 30-page stress-report run, html2realpdf produced a smaller native PDF and completed faster than html2pdf.js.
See benchmark detailsRecorded project benchmark, not a universal performance guarantee. Results vary with content, browser, and hardware.
One element in. One real PDF out.
Install the package, pass an HTML string or mounted DOM element, then download the result. Release the document when you are done.
- 1Install
Use npm, pnpm, Yarn, or Bun.
- 2Render
Pass HTML, an element, or a framework ref.
- 3Download
Save, preview, or get the PDF bytes.
import { renderPdf } from "@imggion/html2realpdf";
const invoice = document.querySelector("#invoice");
if (!invoice) {
throw new Error("Invoice not found");
}
const pdf = await renderPdf(invoice);
try {
pdf.download("invoice.pdf");
} finally {
pdf.dispose();
}import html2pdf from "@imggion/html2realpdf";
html2pdf()
.from(document.querySelector("#report"))
.save("report.pdf");Use the HTML you already have.
A browser-first HTML-to-PDF library for the documents web applications generate every day.
Invoices
Selectable totals, searchable line items, and clickable payment links.
Reports
Native text, vector charts, tables, headers, footers, and page numbers.
Tickets
Compact browser-generated PDFs with copyable references and live links.
Letters
Embedded font subsets and predictable A4 or Letter page geometry.
Slides
Landscape pages with vector graphics that stay crisp at every zoom level.
Documents
HTML strings, DOM elements, React refs, and Vue template refs.
Browser-first, framework-agnostic.
TypeScript handles the DOM boundary and API. WebAssembly runs the Zig layout and PDF writer. The result stays portable across plain JavaScript, React, Vue, and other browser frameworks.
Explore the CSS support matrixQuestions, answered plainly.
Technical claims on this page follow the current repository and public support matrix.
01What makes html2realpdf different from html2pdf.js?+
html2pdf.js captures HTML through html2canvas and places the resulting image into a PDF. html2realpdf writes native PDF text, link annotations, embedded font subsets, and supported vector graphics instead of turning the whole page into a screenshot.
02Does HTML-to-PDF generation happen in the browser?+
Yes. The Zig renderer is compiled to WebAssembly and runs client-side in modern browsers. Your application can generate and download the PDF without sending document content to a conversion server.
03Can I use it with React or Vue?+
Yes. html2realpdf works at the DOM boundary. Pass a mounted DOM element, a React-shaped ref, a Vue template ref value, or an HTML string to the renderer.
04Is there a migration path from html2pdf.js?+
Yes. The default export provides an html2pdf.js-style chain with familiar methods such as from(), set(), save(), output(), and toPdf(). Raster-only stages such as html2canvas, image output, and whole-page canvas output fail explicitly.
05Which CSS features are supported?+
The versioned CSS profiles cover document layout, pagination, tables, Flexbox, Grid, positioned layout, backgrounds, shadows, transforms, and supported SVG. The public CSS support matrix is the source of truth for exact coverage and current limits.
06Can I generate PDF/A-3 compliant documents?+
Yes. The updated renderer supports PDF/A-3u through conformance: "pdfa-3u", with embedded fonts, Unicode mappings, synchronized XMP metadata, and an sRGB color profile. You can also embed original files such as XML. The PDF/A guide covers source availability and how to validate your exported PDF with veraPDF.
07Does it claim full PDF/UA compliance?+
No. The current release provides machine-readable text and accessible preview controls, but it does not claim PDF/UA or fully tagged PDF compliance.
Stop shipping screenshots as documents.
Open source. MIT licensed. Available on npm.
