# eKoopmans/html2pdf.js

Client-side HTML-to-PDF rendering using pure JS.

Repository: https://github.com/eKoopmans/html2pdf.js
Canonical: https://ross.abutalabs.com/products/html2pdfjs
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, pdf-generation, html, client-side, canvas
Last push: 2026-08-26T12:46:39+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 65, longevity 100
- inputs: {"age_days": 3445, "days_push": 7, "days_rel": 234, "gap_med": 4.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4913, forks 1670 (observed 2026-08-28T04:09:02.326709+00:00)

## What it is
html2pdf.js is a JavaScript library that converts webpages or DOM elements into printable PDF files entirely in the browser, built on html2canvas and jsPDF. It requires no server-side processing and supports page-break control, image quality settings, and a worker-style API.

## Use cases
- generate pdf from html in the browser
- convert a webpage to pdf client-side without a server
- export an invoice or report as pdf from javascript
- add a download-as-pdf button to my web app
- capture a dom element as a pdf screenshot
- print html content to pdf with page breaks

## When to choose
- you need PDF generation purely in the browser with no backend
- you want simple page-break and image-quality configuration
- you want a lightweight drop-in script via CDN or npm

## When to avoid
- you need to run PDF generation in Node.js (it is browser-only)
- you need pixel-perfect, text-selectable PDFs rather than canvas-rendered images
- you need server-side batch conversion of HTML documents

## Facets
- artifact type: library
- maturity: active
- function: pdf, image-processing
- domain: pdf, web-development, frontend
- platform: browser
- tags: html-to-pdf, client-side, html2canvas, jspdf, pdf-generation, screenshot, javascript, nodejs

## Member repositories
- eKoopmans/html2pdf.js (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:02.326709+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:03.886288+00:00, confidence not recorded.
  - readme: https://github.com/eKoopmans/html2pdf.js (fetched 2026-08-28T04:09:02.326709+00:00, sha 6450f717b8cb)
  - registry_npm: https://registry.npmjs.org/html2pdf.js (fetched 2026-08-29T09:00:23.398499+00:00, sha 2bf716918a43)
- Data as of 2026-08-30T08:39:29.467469+00:00.
