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.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
- Added typings for TypeScript support.
- Removed APIs that were previously marked as deprecated. Namely:
- 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
- #2817: Fixed top margin in
htmlmethod that occurred with firstname.lastname@example.org
- #2816: Fixed escaping of font names with spaces
- #2702: Fix context2d lineWidth scaling
- #2806: Fix sanitizing of HTML passed as string to the
- #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!