jsPDF v1.5.0 Release Notes

Release Date: 2018-12-20 // over 5 years ago
  • The important stuff:

    • there are now 4 javascript files distributed, the classic two: jspdf.debug.js and jspdf.min.js. New are jspdf.node.debug.js and jspdf.node.js. The node version has no included node modules. Despite this, jspdf.debug.js has as before not included html2canvas.
    • ๐Ÿ‘ TTFFonts should now be better supported
    • ๐Ÿ”จ putStream is now refactored. Because some people use putStream in internal functions-set for their plugins, despite it is not an API, please be careful
    • API.internal.pageSize.width and .height are again working.
    • we have now a new html-method, depending on html2canvas and our context2d-module
    • ๐Ÿ‘€ fromHTML and addHTML are not supported anymore. See below
    • ๐Ÿ“š Documentation is now up to date (as far as possible)
    • compression now works

    ๐Ÿ‘ We will not support any longer fromHTML and addHTML.

    ๐Ÿ”Œ You are free to submit PRs, but we will not invest more time in these two plugins. We have now a new .html method, based on html2canvas and our canvas2d plugin - based on the html2pdf-Plugin by @eKoopmans . This plugin will be maintained in the future. This should lead to more reliable results for your projects. And it will give us the time to focus on the core functionality of pdf-generation because we will not use our energy for writing/supporting/extending 2 html plugins. If you still want to use addHTML or fromHTML as they are still in jspdf. But if some changes break those plugins, you can still use jsPDF 1.4.1, which has a stable version for both plugins.

    ๐Ÿ”„ ChangeLog:

    • 3ce138f minor changes in acroform.js to work properly with polyfills
    • ๐Ÿ–จ 33a3089 Fix AcroForm Print Bug
    • a483c9b setFont(): warn if font is not found
    • c0fa3ce add a font converter
    • ๐Ÿ‘ bcf14ed fix for #1876 Uint8Array AddImage Support
    • 0๏ธโƒฃ 88f7d07 set default DV in acroform.js to null
    • ๐Ÿ— 48ca33c restructure build files
    • ๐Ÿšš b6b175a modify jsPDF to handle latest html2canvas version, remove html2canvas and Stackblur from project and make it an external dependency
    • ๐Ÿ”Œ 2af8438 modify context2d-plugin to work like a real 2d-context
    • ๐Ÿ”จ 511afdd 4bd7d5c refactor context2d-plugin
    • ๐Ÿ—„ 87fd3f2 deprecate fromHTML and addHTML, add html-plugin, which is based on html2canvas and solution of @eKoopmans
    • ๐Ÿ›  1449e14 Bugfix/dataurl validation addimage
    • f6f5c36 putTotalPages works now with customfonts
    • ๐Ÿ›  1449e14 bugfix dataurl validation in addimage
    • ๐Ÿ“š f251457 small changes in cell.js, add more documentation
    • ๐Ÿ“š 970b03d Restructure doc generation and add more documentation
    • ๐Ÿ”จ 1019eca major refactoring of jspdf.js, add alot of unit testing
    • c53beb6 Font Dictionary now has toUnicode entry to be able to copy paste out from pdf viewer, thanks to @zhangchen0514
    • ๐Ÿ›  5c489f1 bugfix in addimage.js generateAliasFromData had problem with ArrayBuffers
    • ade1227 FlateEncode, ASCIIHexencode and compression is not working
    • 0890ad5 Fix TTF Fonts Not Working when indexToLocFormat is 0, thanks to @briandevet
    • ๐ŸŽ d8b698c Modify addimage.js so that the validations are done when conversions throw errors (increases performance)
    • โš  ccb4519 acroform-methods sometimes overwrite existing javascript functions like Button() in sharepoint, if one of those methods are in the global scope, jsPDF wont overwrite the those methods anymore and will show a warning in console.log.
    • 1ea40e4 added a bidiEngine to jsPDF. now there is no necessity for an lang: 'ar' flag in .text-method, it will be solved automatically
    • ๐Ÿ”จ 42e0564 completely refactored acroform.js (again). now acroform classes have better attributess and methods. it is now documented too.
    • ๐Ÿ”จ cd4b710 annotations.js got refactored, now acroform-elements and annotations can be used at the same time
    • 8f33f4b new folder structure. put sourceode into src-folder. Thus should result into less confusion, because before people were sometimes using jspdf.js and complained about non-working methods, but it was because they should have used dist/jspdf.debug.js or min.js
      and some minor stuff, which we forgot to mention
    • d66d52b Add UserUnit option and limit pages to 14400x14400 UserUnits according to PDF Reference
    • b1704fa fix invalid typecheck in acroform.js for attribute maxLength, thx to @samlanning
    • 59ca71d add baseline option to API.text
    • ๐Ÿ’ป be04de1 addimage.js now loads png-images directly and doesnt process them through canvas, Image-Elements of Browser-DOM now load directly the files
    • d3e1dba pages can have now artBox, bleedBox, cropBox, trimBox - values, internal processing of mediaBox is changed, still needs proper API methods
    • ๐Ÿ“š 65bba3c Correct the documentation in jspdf.js, thx to @silvioprog
    • ๐Ÿ— 45dbf21 improve version handling while building the distribution, thx to @bwl21
    • 68b41fb add miterLimit functionality to pdf and context2d