jsPDF
github.com
- Free plan
- Linux
- Web
- API
What jsPDF is
jsPDF is a JavaScript library for generating PDFs in client-side applications, including tickets, reports, and certificates. It accepts text, HTML, images, SVG, and TTF fonts, and documents can specify paper size, orientation, and measurement units. The project distributes ES2015 modules, a Node.js build, UMD modules, and polyfills for older browsers. Developers can install it with npm or Yarn, load the UMD build from unpkg, or import it into major frameworks; TypeScript typings and Meteor setup are documented. HTML generation can use html2canvas, while string HTML input also needs dompurify. UTF-8 text requires a custom font with the necessary glyphs. Advanced API mode adds patterns, FormObjects, and transformation matrices; compatibility mode keeps plugin compatibility but omits some advanced features. jsPDF is MIT-licensed and co-maintained by yWorks. The project advises sanitizing input, restricts local Node.js file reading by default, and offers paid personalized assistance instead of free support.
Who it suits
jsPDF suits developers building web or JavaScript applications that generate PDFs from text, markup, images, SVG, or custom fonts. It is also relevant to teams needing framework and TypeScript integration.
Good to know, and what to watch
- Generates PDFs in client-side JavaScript
- Accepts text, HTML, images, SVG, and TTF fonts
- Supports multiple module and browser formats
- Includes TypeScript typings and framework guidance
- MIT-licensed open-source library
- Open-source software includes no free support
- UTF-8 text needs a suitable custom font
- HTML features require optional dependencies
- Only latest major and minor versions receive security updates
Plans
Every plan and priceFree use
Free plan
The verdict
jsPDF offers a flexible JavaScript route to PDF generation with broad input and runtime support. Developers should plan for font setup, optional HTML dependencies, input sanitization, and paid support if assistance is needed.
What the maker publishes
- Advanced features
- Advanced API mode supports patterns, FormObjects, and transformation matrices, while compatibility mode preserves plugin compatibility but lacks some of those features. source
- Client-side
- The maker describes jsPDF as an HTML5 client-side solution for PDF generation. source
- Document setup
- Documents can be configured with a chosen paper size, orientation, and measurement units. source
- Fonts
- UTF-8 text requires a custom font with the needed glyphs, and jsPDF supports TTF files. source
- Framework integration
- The README says jsPDF can be imported into major toolkits and frameworks and provides TypeScript typings; it also documents Meteor installation. source
- HTML support
- The HTML method uses optional html2canvas and, for string HTML input, dompurify dependencies. source
- Install
- The project recommends installing jsPDF from npm or Yarn and also documents loading its UMD build from unpkg. source
- License
- jsPDF is distributed under the MIT License. source
- Maintainers
- The README says jsPDF is co-maintained by yWorks. source
- Purpose
- jsPDF is a JavaScript library for generating PDFs, including event tickets, reports, and certificates. source
- Runtime formats
- The distribution includes ES2015 modules, a Node.js build, UMD modules, and polyfills for older browsers. source
- Security
- The project advises sanitizing user input and says Node.js local file reading is restricted by default. source
- Security updates
- The security policy says only the latest major and minor versions receive security updates. source
- Support
- The product page says the open-source software does not include free support and offers paid personalised project assistance. source
Checked against the maker's pages on 9 Oct 2026.