NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2096 most downloaded on npm
PDF Document creation from JavaScript
Last release 6 months ago
17 Mar 2026
Ships unpredictably
gaps range from 2 weeks to 2.6 years
Most releases are documented
notes for 29 of 34 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
34 releases · first in 2015
Fix HTML Injection in output methods vulnerability.
This release fixes two security issues.
Full Changelog: v4.2.0...v4.2.1
Fix PDF Injection in AcroForm module allows Arbitrary JavaScript Execution (RadioButton children) vulnerability.
This release fixes three security issues.
Full Changelog: v4.1.0...v4.2.0
One column per quarter.
Fix PDF Injection in AcroForm module allows Arbitrary JavaScript Execution vulnerability
This release fixes several security issues.
Full Changelog: v4.0.0...v4.1.0
This release fixes a critical path traversal/local file inclusion security vulnerability in the jsPDF Node.js build. File system access is now restric…
This release fixes a critical path traversal/local file inclusion security vulnerability in the jsPDF Node.js build. File system access is now restricted by default and can be enabled by either using node's --permission flag or the new jsPDF.allowFsRead property.
There are no other breaking changes.
This release includes a bunch of bugfixes. Thanks to all contributors!
This release includes a bunch of bugfixes. Thanks to all contributors!
Full Changelog: v3.0.3...v3.1.0
This release fixes regressions with PNG encoding that were introduced in v3.0.2.
This release fixes regressions with PNG encoding that were introduced in v3.0.2.
Full Changelog: v3.0.2...v3.0.3
This release fixes a security issue where parsing of corrupt PNG images could lead to long running loops and denial of service.
This release fixes a security issue where parsing of corrupt PNG images could lead to long running loops and denial of service.
Full Changelog: v3.0.1...v3.0.2
This release fixes two security vulnerabilities:
This release fixes two security vulnerabilities:
addImage method and the methods html and addSvgAsImage, which depend on addImageThis major release officially drops support for Internet Explorer and fixes a security vulnerability in the html function by updating the optional dep…
This major release officially drops support for Internet Explorer and fixes a security vulnerability in the html function by updating the optional dependency dompurify to v3.2.4. There are no other breaking changes.
Full Changelog: v2.5.2...v3.0.0
This release upgrades the Dompurify dependency to 2.5.4 with fixes a vulnerability with high severity: GHSA-mmhx-hmjr-r674 .
This release upgrades the Dompurify dependency to 2.5.4 with fixes a vulnerability with high severity: GHSA-mmhx-hmjr-r674.
It also upgrades fflate, core-js, and @babel/runtime to more recent versions.
This release fixes two security related issues.
This release fixes two security related issues.
output('pdfobjectnewwindow')setDisplayMode (CWE-1333)This release adds some minor new features and fixes some bugs, e.g. related to multiline text. Thanks to all contributors!
This release adds some minor new features and fixes some bugs, e.g. related to multiline text. Thanks to all contributors!
getLineWidth functionhorizontalScale option to text functionhtml function only rendering on the first invocation per documentcontext2D.closePath (now properly closes the path)textWithLink for multiline textlineHeightFactor in text options having no effecthtml typingssave function in typings (promise overload)This release brings long awaited improvements to the html function and many other bugfixes and improvements. Thanks to all contributors!
This release brings long awaited improvements to the html function and many other bugfixes and improvements. Thanks to all contributors!
width and windowWidth options to the html method, which will make correct scaling much easier.margin option for html method and add autoPaging option with two different modes: 'slice' and 'text'.setLineDash and lineDashOffset to context2d.rowStart and cellStart events and headerTextColor property to `table' functionsetFont with fontWeight parameter for the built-in basic fontsaddImage performance.addImage.getDrawColor function to typings.addImage.jsPDFOptions type in the typings.output function.Small bugfixes. Thanks to all contributors!
Small bugfixes. Thanks to all contributors!
getTextDimensions() with maxWidth settable() functionaddImage functionoutput functionA couple of bugfixes, improved font handling and faster compression.
A couple of bugfixes, improved font handling and faster compression.
textWithLinkoptions.flags parameter was ignored by the text method and consequently had the wrong defaults. This lead to garbled characters sometimes and was a regression to 1.5.3.fontFaces option for the html method that allows to add fonts similar CSS @font-face rules (no addFont calls required anymore). When supplied, fonts are resolved using the CSS 3 font loading algorithm.Incorporates many of the awesome contributions in context of the Hacktoberfest. Thanks to all the contributors!
Incorporates many of the awesome contributions in context of the Hacktoberfest. Thanks to all the contributors!
maxWidth text optionImageCompressiontext method"Could not load <module>" error messages- #2893, #2880: Fixed html() typings and JSDoc documentation - #2884: Fix type of events in typings - #2881: Fix building jsPDF with Parcel v2
html() typings and JSDoc documentationevents in typingsNothing published for this version
There are some breaking changes in the API. But these are mostly API-methods which you should not use anyway.
Finally a new release!
A lot has changed since the last release:
jspdf.debug/min.js is now jspdf.umd(.min).js. We also changed the name of the global variable to jspdf (lower case) when using script tags to be consistent with the new es modules format and named imports/exports. For backwards compatibility add this line:window.jsPDF = window.jspdf.jsPDF
addHTML, fromHTML, html2pdf, addSvg, addButton, addTextField, addChoiceField, cellInitialize, setFontStyle, setFontType, clip_fixed.Here an (incomplete) list of additional bugfixes and changes:
maxWidth parameter to getTextDimensionshtml method that occurred with html2canvas@1.0.0-rc5html methodThere are some breaking changes in the API. But these are mostly API-methods which you should not use anyway.
While this release is a big step in the right direction, there are still many open issues (currently ~90). The maintainers of this repo (currently mostly @HackbrettXXX) have very limited time and can't resolve them all without the help of the community. This is another shout out to the community: if you like this project and want to make it even more awesome, consider spending one or two hours on improving it. Pull requests are very much appreciated!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Thanks to @arasabbasi and @dasaCoder. We've got another bugfix release:
Thanks to @arasabbasi and @dasaCoder. We've got another bugfix release:
var TextField = new jsPDF.API.AcroForm.TextField() or var TextField = new doc.AcroFormTextField(); in AcroForm.jsextractInfoFromBase64DataURI in addImage-Plugin (c0a5e3a)getImageFileTypeByImageData in addImage.js (3d32fb7)addSVG to addSvg, but keeping addSVG for backwards-compatibility to svg.js (3d32fb7)build.js independent from git call (c2d8501)As usual, thanks to everyone who has contributed!
This is a biggie!
As usual, thanks to everyone who has contributed!
We'll be adding to the Unicode documentation as we go.
Big thanks to @arasabbasi for getting this shipped!
The three main aspects of this release were UTF-8-support, increased NodeJS/AngularJS/WebPack-support and stabilizing jsPDF by fixing bugs.
jsPDF supports finally UTF-8 by having the ability to use custom fonts. We want to thank here especially to contributor @sphilee, who programmed the TTFFont.js library file, which is the core of this great feature. Because of the specialties of the arabic-writing-system we have a separate plugin for that writing system.
In the light of the increased amount of reported issues by nodeJS/angularJS/WebPack-users we focused in this build on increased compatibility with nodeJS and other third-party-software. We hope that those changes will solve the reported issues to your sufficiency.
A lot of bugfixes were applied to the core and the addimage.js-plugin.
As jsPDF has grown, we've been managing some technical debt. Some of this is from before NPM existed - so those dependencies were brought in through g
As jsPDF has grown, we've been managing some technical debt. Some of this is from before NPM existed - so those dependencies were brought in through git. That's now fixed, which should mean you can install jsPDF into containers without git.
We also removed a load of old unneeded files. We'll continue tidying up, as we have some pretty big changes coming up soon.
Main fixes include:
As always, let me know how you get on! Please report any issues using the template, creating a working jsbin example really helps us to sort the issue out quickly.
This release integrates all previous hotfixes, so if you were daring and enabled them, you can now remove those instructions from your code as they ar
This release integrates all previous hotfixes, so if you were daring and enabled them, you can now remove those instructions from your code as they are now enabled by default.
You can see the commits for list release here: https://github.com/MrRio/jsPDF/commits/master
The official notes for this release are pending.
We've got a bunch of fixes for SVG display, including:
We've got a bunch of fixes for SVG display, including:
We've also introduced a selection of SVG hotfixes which can be optionally enabled. These may be enabled by default and completely merged in the future.
Nothing published for this version
c1dcb877a3ba78d080b970f5acba5814757921b8 Made it possible to draw SVG with a transparent background
In this release we've:
Big thanks to @Flamenco and SAP for this release.
Big thanks to @Flamenco and SAP for this release.
You can test out the SVG functionality by running:
npm start
and then visiting:
http://localhost:8000/examples/canvg_context2d/bar_graph_with_text_and_lines.html
We've also done the following:
Acroforms support! Make fillable PDFs.
Features include:
Tidy up. Fix some long standing issues with the previous release in the dist files.
Tidy up. Fix some long standing issues with the previous release in the dist files.
This is a large update, and is in preparation for a larger refactor.
This is a large update, and is in preparation for a larger refactor.
[2014-09-29][diegocr][43eb081] New dist files. [2014-09-21][diegocr][d477072] Added setDisplayMode function to define zoom, layout, and page modes [20
[2014-09-29][diegocr][43eb081] New dist files.
[2014-09-21][diegocr][d477072] Added setDisplayMode function to define zoom, layout, and page modes
[2014-09-20][diegocr][30dbe14] Clipping Lines to Inside a Rectangle - closes #328
[2014-09-20][diegocr][d7cb062] Added setPage() function - closes #108
[2014-09-20][diegocr][4c9c0ec] Automatically add new pages if .text() would overflow - closes #119
[2014-09-20][diegocr][7da6aac] Adding letter-spacing method - closes #143
[2014-09-20][diegocr][b6f019c] Added Image Rotation support - closes #338
[2014-09-20][diegocr][2b53fb4] Added per-page support for document width, height, format and orientation - #49
[2014-09-19][diegocr][3da4b59] New dist files.
[2014-09-19][diegocr][9f814ae] Added Line BReaks support to fromTHML
[2014-09-19][diegocr][672105c] fromHTML fixes kindly suggested by @mcurland
[2014-09-19][diegocr][2bb6a89] Fixed #355 - missing images on fromHTML()
[2014-09-18][diegocr][b675300] Fixed #348 - fromHtml method blows pdf graphics stack
[2014-09-18][diegocr][f3f6261] Fixed getTextDimension() for Firefox - closes #235
[2014-08-28][yscumc][6899fac] Fix for CreationDate timezone #345
[2014-08-28][James Hall][ef1626c] Use UTC time in CreationDate, fixes #345
[2014-08-11][diegocr][f35960b] MSIE cannot handle Data URIs on the live example... closes #334
[2014-07-28][diegocr][d88c833] addImage: Implemented generateAliasFromData - Related to #99 and #300
[2014-07-22][diegocr][8f9d6cd] New dist files.
[2014-07-22][Diego Casorran][ed1c917] Fixed #301
[2014-07-19][diegocr][1fde787] Workaround for dataurlnewwindow usage on Safari.
[2014-07-19][diegocr][140c979] Added bloburl output type.
[2014-07-19][diegocr][e33e44f] Slightly improved our SAFE function
[2014-07-17][diegocr][41fcc3a] New dist files.
[2014-07-16][Huy, Vuong Do Thanh][6f9361b] requirejs patch for anonymous define()
[2014-07-02][Antoine Duchateau][07908c3] fixed grayscale JPEG
[2014-06-29][Wolfgang Gassler][2c565a2] margin padding support for floated images
[2014-06-29][diegocr][8247a27] addImage: detect png format from img.src - related to #291
[2014-06-27][diegocr][0f3c2d0] addImage: Detect PNG format from raw data - related to #291
Your coding agent can read these notes before it upgrades. Set up the MCP server →