jsPDF v2.0.0 Release Notes
Release Date: 2020-08-11 // over 3 years ago-
๐ Finally a new release!
๐ A lot has changed since the last release:
- ๐ jsPDF is now co-maintained by yWorks and we merged the yWorks fork into this repo adding a lot of new features like patterns, matrices, simple path operations, etc. See the readme for details.
Modernized the output bundles: there are now bundles for ES modules, UMD and a special node version. We renamed the files in dist for consistency:
jspdf.debug/min.js
is nowjspdf.umd(.min).js
. We also changed the name of the global variable tojspdf
(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
โ Added typings for TypeScript support.
โ Removed APIs that were previously marked as deprecated. Namely:
addHTML
,fromHTML
,html2pdf
,addSvg
,addButton
,addTextField
,addChoiceField
,cellInitialize
,setFontStyle
,setFontType
,clip_fixed
.๐ Fixed the file-saver npm/bower install issue where jsPDF depended on a (non-existent) version directly from GitHub.
Made it compatible with all major toolkits and frameworks.
๐จ Refactored big parts of the code.
๐ A lot of small and big bugfixes. Especially thanks to @SmythConor, @bwl21, @32leaves, @mktcode, @durs, @kakugiki, @AdamGold and many others!
๐ Here an (incomplete) list of additional bugfixes and changes:
- ๐ #2835: Fixed reading of compound glyphs when using custom fonts
- ๐ #2834: Fixed usage of custom fonts in context2d/when using the html method
- #2824: Added
maxWidth
parameter togetTextDimensions
- ๐ #2817: Fixed top margin in
html
method that occurred with [email protected] - ๐ #2816: Fixed escaping of font names with spaces
- #2702: Fix context2d lineWidth scaling
- #2806: Fix sanitizing of HTML passed as string to the
html
method - #2797: Fix scaling issue with Acroform fields
- #2793: Fix autopaging issue in context2d with 10 or more pages
- โ addImage and addFont accept now urls as parameters so the conversion to dataURLs is now only needed if you want to avoid CORS restrictions
- ๐ WebP and JPEG Raw are now supported.
- unnecessary data conversions are now reduced, so for example images should now render faster
There 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!