# jsPDF

> Client-side JavaScript PDF generation for everyone.

Source: https://talira.ai/catalog/jspdf-1ag2wrna
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / generation](https://talira.ai/categories/documents/pdf/generation), [languages / javascript](https://talira.ai/categories/languages/javascript), [frontend / browser](https://talira.ai/categories/frontend/browser)
- Platforms: web, linux, macos, windows
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Plugins: yes
- Backed by: [yWorks](https://talira.ai/orgs/yworks.md)
- Creator: James Hall (MrRio), Parallax

jsPDF is a JavaScript library that creates PDFs in the browser (and in Node.js with a separate build) by drawing text, shapes and images through an imperative API. Its html() method can turn a DOM element into PDF content using the optional html2canvas dependency (plus [DOMPurify](https://talira.ai/catalog/dompurify-tes35ecb.md) for HTML strings). The 14 standard fonts cover only ASCII, so other scripts need a custom TTF font registered with the bundled converter or addFont. It was created by James Hall (MrRio, Parallax) and is now co-maintained by yWorks.

## Links

- Website: https://parall.ax/products/jspdf
- GitHub: https://github.com/parallax/jsPDF
- Docs: https://parallax.github.io/jsPDF/docs/

## Problems it solves

- make a PDF in the user's browser without sending data to a server
- let users download a certificate as a PDF from a static site with no backend
- save a chart canvas or image as a PDF on the client side
- offline web app needs to produce a PDF while there's no network
- draw text, lines and boxes onto a PDF page from JavaScript
- turn a div on my page into a downloadable PDF with a button click
- add a Unicode font so Cyrillic or Chinese text shows up in a client-generated PDF
- privacy rules mean the document data can't leave the browser, but we still need a PDF
- generate a simple receipt PDF in an Angular or Vue app

## Features

- imperative API for text, shapes and images
- browser builds (ES module, UMD, global) and a Node.js build
- html() via optional html2canvas and DOMPurify
- custom TTF fonts via fontconverter or addFont
- compat API mode for older plugins
- polyfills for Internet Explorer

## Capabilities

- Takes plugins: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.65 out of 1.
Signals: maintenance 0.61, adoption 0.90, momentum 0.66, community 0.94, backing 0.50, extensibility 0.20.

- last commit 10 days ago
- 1 commits in the last 90 days
- latest release v4.2.1 8 months ago
- 31.3k GitHub stars
- 229 contributors
- backed by yWorks
- created by James Hall (MrRio), Parallax
- has a plugin system

## Alternatives

- [PDFKit](https://talira.ai/catalog/pdfkit-2tzqj5bd.md): A JavaScript PDF generation library for Node and the browser.
- [pdfmake](https://talira.ai/catalog/pdfmake-811sdqwj.md): PDF document generation library for Node.js and browsers, written in pure JavaScript
- [@react-pdf/renderer](https://talira.ai/catalog/react-pdf-renderer-e1aq29ey.md): PDFs, made with React
- [pdf-lib](https://talira.ai/catalog/pdf-lib-80dtat8x.md): Create and modify PDF documents in any JavaScript environment.
- [Puppeteer](https://talira.ai/catalog/puppeteer-vbv4zakx.md): JavaScript API for Chrome and Firefox
- [ironpress](https://talira.ai/catalog/ironpress-g94sb527.md): HTML to PDF. In process. In pure Rust.
