jsPDF
Reasonable, with limits. 8th of 9 PDF libraries.
jsPDF is the oldest and most widely installed library for making PDFs in the browser. It has an imperative, canvas-like API with MIT licence and bundled types. It is still a reasonable pick for simple client-side documents. For structured, multi-page reports, pdfmake or React-pdf now do the job better, and jsPDF has had a steady run of injection advisories.
Best for: Teams that need quick, simple PDFs drawn in the browser, or a PDF capture of on-screen HTML, without a server.
Scores
Overall6.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
jsPDF is still a workable, well-known choice for simple client-side PDFs, with huge adoption and an API agents know well. Its lack of layout, its weak HTML conversion, slowing development and frequent injection advisories put it behind pdfmake and React-pdf for structured documents. pdf-lib's stalled maintenance does not make jsPDF the better editing tool, because jsPDF cannot edit at all.
- peers: pdfmake, PDFKit and React-pdf are more active and grew faster
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Positioned for simple or legacy use
- github.com/parallax/jsPDF/releases: Recent releases are all security fixes
GPT-6.2 Sol: 7.2, likely 6.1 to 8.3
Pick jsPDF for new browser projects that generate PDFs with predictable layouts and need direct control over placement. Choose pdfmake for reports that need automatic layout across pages, or PDF.js for viewing existing files. Established integrations and same-day security fixes support a strong recommendation for browser exports. The release gap and unresolved layout bugs keep the recommendation narrower.
- github.com/parallax/jsPDF/blob/v4.2.1/README.md: Documents browser exports and direct drawing.
- js.devexpress.com/jQuery/Documentation/ApiReference/Common/Utils/pdfExporter: Established integration for client-side exports.
- github.com/bpampuch/pdfmake: Provides built-in flow and table pagination.
- github.com/mozilla/pdf.js: Dedicated browser PDF reader.
- github.com/parallax/jsPDF/releases: March security release remains the latest.
- github.com/parallax/jsPDF/pull/4028: HTML pagination fix remains open.
Needed by many5.3
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
Many web apps need to make invoices, receipts or reports as PDF, and jsPDF serves both browser and Node. Its approach is client-side generation only. It cannot read or show PDFs, which is a large part of this category's job, so it covers only part of the category.
- github description: Client-side JavaScript PDF generation
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Browser-first; editing existing PDFs is limited and merging is not supported
GPT-6.2 Sol: 4.6, likely 3.5 to 5.8
PDF export is a recurring need in business apps, from invoices to reports and data grids. jsPDF serves that need across frameworks in browsers and Node.js, and its scope is creating new documents. PDF.js serves viewing and pdf-lib serves editing existing files. The integrations show where jsPDF fits, but give little basis for estimating how many JavaScript developers need it.
- github.com/parallax/jsPDF/blob/v4.2.1/README.md: Documents browser and Node.js builds and framework-independent use.
- js.devexpress.com/jQuery/Documentation/ApiReference/Common/Utils/pdfExporter: Shows grid and Gantt exports across several web frameworks.
- github.com/mozilla/pdf.js: PDF.js covers reading and rendering.
- pdf-lib.js.org: pdf-lib covers loading and modifying existing PDFs.
Helps a lot6.2
How well does it do the job for those who need it?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
The API is easy for simple documents and has types, custom fonts, images, AcroForms and plugins. It has no reflow or automatic page breaks. The HTML path rasterizes text through html2canvas and has many open rendering complaints. pdfmake and React-pdf handle structured, multi-page documents clearly better, and pdf-lib handles editing.
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: No page flow; tables need a plugin; html2canvas output is a screenshot
- github.com/parallax/jsPDF/issues/3532: User reports of html() rendering problems
- joyfill.io/blog/comparing-open-source-pdf-libraries-2025-edition: Independent comparison: easy for simple PDFs, struggles with complex layouts
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 7.4, likely 6.3 to 8.5
The drawing API is easy to start with, and the examples and bundled types give coding agents a clear path for basic exports. jsPDF was fast in an independent Node.js invoice test, which covered one short layout. A user measured text-centering errors in 4.2.1, and a pending fix documents lost lines in HTML pagination. pdfmake handles flowing reports with less layout code, and published evidence is thin on coding-agent accuracy for complex documents.
- github.com/parallax/jsPDF/blob/v4.2.1/README.md: Shows basic drawing, TypeScript imports, font setup, and API modes.
- orshot.com/blog/nodejs-pdf-generator: Measured roughly 0.1 ms for one simple invoice in a warm Node process.
- github.com/parallax/jsPDF/issues/3984: User measured built-in font centering errors in 4.2.1.
- github.com/parallax/jsPDF/pull/4028: Open patch documents lost or misplaced lines during HTML pagination.
- github.com/bpampuch/pdfmake: Documents built-in flow, wrapping, and repeated table headers.
Holds up over time5.5
Will it still be a good choice in two years?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
The repository is active enough to ship security fixes: 4 releases in the past year, all driven by advisories, and the 4.0 major had only one breaking change. Only 29 commits landed in the past year, and nothing has shipped since March 2026. Feature work has mostly stopped, and the project depends on a small group of maintainers. PDFKit, pdfmake and PDF.js are far more active.
- github commitsLastYear: 29 commits, against 167 to 3189 for active peers
- github latestRelease: v4.2.1 on 2026-03-17, about 8 months ago
- github.com/parallax/jsPDF/releases: Recent releases are security-only; 4.0 broke only filesystem access
- github openIssues: 96 open against 2508 closed; issue backlog is kept under control
GPT-6.2 Sol: 5.9, likely 4.6 to 7.3
The repo was pushed to in November and landed 29 commits in the past year, but all four releases came between January and March. PDFKit and pdfmake have more recent releases and substantially more commits. Version 4 changed how Node.js apps load local files, and a detailed font bug report was closed by the stale bot. The project names yWorks as a co-maintainer, but one person published all four releases and ongoing funding is unclear.
- github pushedAt, commitsLastYear, releasesLastYear, latestRelease: November push, 29 commits, four releases, and a March latest release.
- peers PDFKit and pdfmake: Both released in November and recorded more than 160 commits.
- github.com/parallax/jsPDF/actions/workflows/npm-publish.yml: The same person triggered all four successful 4.x publishes.
- github.com/parallax/jsPDF/releases: Version 4 restricted Node.js file access by default.
- github.com/parallax/jsPDF/issues/3984: The stale bot closed the reported centering bug.
- github.com/parallax/jsPDF/blob/v4.2.1/README.md: Names yWorks as a co-maintainer.
Used widely7.3
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
jsPDF has about 22,000 dependent repositories, similar to PDFKit and pdfmake, and about 87M downloads in 4 weeks. Its download ratio of about 5.6 beats the 4.1 median, so it still gains ground. Most peers grew faster, though: pdf-lib, PDFKit, PDF.js and React-pdf all rose 8 to 15 times. Part of the volume comes from transitive installs such as html2pdf.js.
- npm downloadsLast4Weeks: 86.5M, against 15.6M a year earlier (ratio 5.6)
- dependents repos: 21,994 repos and 1,518 packages
- github stars: 31k stars, second only to PDF.js in the category
GPT-6.2 Sol: 6.6, likely 5.5 to 7.8
ecosyste.ms found about 22,000 dependent repositories, close to PDFKit and pdfmake, and GitHub records about 31,000 stars. Downloads rose from 15.6 million to 86.6 million over the same four weeks a year apart. That 5.6× gain beat the 4.1× catalog median, while PDFKit and React-pdf renderer grew faster. Automated installs and dependencies such as html2pdf.js make it hard to tell how much of that growth came from new projects choosing jsPDF directly.
- dependents repos, packages: 21,994 repositories and 1,518 npm packages in the index.
- github stars and bluesky posts: 31,317 stars and four recent Bluesky posts linking to the repo.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 5.6× year-over-year growth against a 4.1× catalog median.
- peers: PDFKit and pdfmake have similar indexed use, while several peers grew faster.
- github.com/eKoopmans/html2pdf.js/blob/main/package.json: html2pdf.js installs jsPDF as a direct dependency.
Vouched for6.1
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
Independent comparisons still recommend jsPDF for quick browser PDFs, and it has a wide base of dependents. No survey data or named production users showed up. Current write-ups mostly steer structured or editing work to pdfmake, pdf-lib or React-pdf, and an HN Show post framed a smaller alternative against jsPDF's size.
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Recommended only for simple docs and HTML capture
- joyfill.io/blog/comparing-open-source-pdf-libraries-2025-edition: Third-party comparison of open-source PDF libraries
- hackerNews top: TinyPDF pitched as 70x smaller than jsPDF
GPT-6.2 Sol: 7.1, likely 5.9 to 8.2
DevExpress uses jsPDF for DevExtreme exports, and HCL BigFix lists it in its Patch V11 product notices. html2pdf.js also relies on it, and an independent test found it fast for a simple invoice. The product notices cover an older version, and the benchmark and available survey evidence leave more demanding workloads and developer satisfaction uncertain.
- js.devexpress.com/jQuery/Documentation/ApiReference/Common/Utils/pdfExporter: DevExtreme documents jsPDF as the engine for grid and Gantt PDF export.
- support.bigfix.com/product/documents/opensource/Notices_BigFix_Patch_V11_Jan2026.pdf: HCL BigFix Patch V11 lists jsPDF 3.0.3.
- github.com/eKoopmans/html2pdf.js/blob/main/package.json: html2pdf.js builds on the current jsPDF major version.
- orshot.com/blog/nodejs-pdf-generator: Independent benchmark covers one simple invoice.
- 2025.stateofjs.com/en-US/libraries: The survey provides no jsPDF satisfaction or retention rating.
Safe5.7
How safe is it to depend on?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
The library has 15 advisories, 12 of them in the past 24 months. They include a critical path traversal in the Node build, a critical HTML injection, and several AcroForm and addJS injections that allow JavaScript to run in the PDF. All were fixed, usually with releases on the same day as the advisory, and the licence is MIT with only 3 direct dependencies. Still, the steady stream shows a large attack surface whenever untrusted input reaches its APIs, and there is no Scorecard data.
- advisories last24Months: 12 advisories, including CRITICAL and HIGH in 2026
- securityweek.com/critical-vulnerability-patched-in-jspdf: CVSS 9.2 local file inclusion in Node build, fixed in 4.0.0
- nvd.nist.gov/vuln/detail/CVE-2026-25940: AcroForm injection enabling JS execution, fixed in 4.2.0
- npm dependencies: 3 direct dependencies, MIT licence
- scorecard: No OpenSSF Scorecard available
GPT-6.2 Sol: 6.3, likely 5.0 to 7.6
The 4.x releases addressed the recent serious advisories by public disclosure, including the critical HTML injection fixed in 4.2.1. The MIT package declares three required dependencies and four optional ones. GitHub Actions publishes to npm using a token, and one person triggered the last four publishes. The lack of an OpenSSF Scorecard result and uncertainty about who else can publish widen the range.
- advisories recent and scorecard: Several recent serious advisories and no collected Scorecard result.
- github.com/parallax/jsPDF/releases: Records the 4.x security fixes and their release dates.
- github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5: Confirms the critical March advisory was patched in 4.2.1.
- github.com/parallax/jsPDF/blob/v4.2.1/package.json: MIT license, three required dependencies, and four optional dependencies.
- github.com/parallax/jsPDF/blob/v4.2.1/.github/workflows/npm-publish.yml: GitHub release publication triggers token-based npm publishing.
- github.com/parallax/jsPDF/actions/workflows/npm-publish.yml: One release actor across the four successful 2026 publishes.
Good
- The simple drawing API (text, lines, images, fonts) is easy to learn, and AI agents write correct code for it because examples are everywhere.
- It runs fully in the browser with no server, and also runs in Node.
- Its plugin ecosystem, such as jspdf-autotable and html2pdf.js, covers tables and HTML capture.
- It is MIT-licensed with bundled TypeScript types and only 3 direct dependencies.
Bad
- There is no layout engine and no automatic page flow, so multi-page reports need manual positioning.
- html() relies on html2canvas and often gives rasterized, unsearchable or misaligned output.
- Twelve advisories in 24 months, several high or critical injection flaws, show a risky surface whenever untrusted input reaches it.
- Development is slow: 29 commits in the past year, and the last release, a security fix, came out in March 2026.
The numbers
- npm downloads, 4 weeks
- 87M ×5.6 in a year
- GitHub stars
- 31k
- Commits, 12 months
- 29
- npm version
- 4.2.1 Mar 2026
- Versions, 12 months
- 4
- Advisories, 24 months
- 12 of 15 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (parallax/jsPDF), npm (jspdf), OSV and the OpenSSF Scorecard.
PDF libraries
- 8.7PDF.js
- 7.6PDFKit
- 7.4React-PDF viewer
- 7.4unpdf
- 7.3React-pdf renderer
- 7.2pdfmake
- 6.9pdfme
- 6.4jsPDF
- 4.9pdf-lib