Releases: simonbengtsson/jsPDF-AutoTable
v3.0.2
Added minCellWidth option.
v3.0.0
BREAKING
The hooks API has been simplified. Note that colspans and rowspans now is supported so you can use that instead of the old drawCell hack.
- Removed hooks: createdCell, createdHeaderCell, drawHeaderCell, drawCell, drawRow, drawHeaderRow and addPageContent
- Added hooks: didParseCell, willDrawCell, didDrawCell and didDrawPage
All other changes should be backwards compatible, but it's a rewrite of the plugin so file an issue if you encounter something that did not work as expected after upgrading.
Migrating
Migrating to version 3.0 should be rather painless as most changes are backwards compatible. Everything was pretty much rewritten however so open an issue if you encounter any problems!
The removed hooks can be replaced as follows:
- drawCell, drawRow and similar → didDrawCell with potensial checks to only draw things if on the wanted section (head, body or foot)
- createdCell → didParseCell
- addPageContent → didDrawPage
Changelog
- BREAKING: Old hooks with new ones (See above)
- BREAKING: No longer supports 0.9.x of jsPDF
- BREAKING: Now targets ES5 (no longer supports <=IE8)
- Added native rowspan and colspan support
- Added multiple header rows support
- Added footer rows support
- Added html initialization with
html: string|HTMLTableElement. If set to string it should be a css selector pointing to a table element. - Added
useCss: booleanfor using some basic css styles when table initialized from html - Added
includeHiddenHtml: booleanoption - Added
showFooteroption (similar to showHeader) - Added
footerStylesoption (similar to headerStyles) - Added
rowPageBreakoption - Added text align justify (with the style halign: 'justify'
- Added automatic startY when multiple tables are used
- Changed initialization to
doc.autoTable({head: ..., body: ... foot: ..., columns: ...}) - Changed getting last autoTable instance from
doc.autoTable.previoustodoc.lastAutoTable - Changed default overflow method to linebreak (previously it was ellipsize)
- Changed
rowHeightstyle tocellHeight - Changed
columnWidthstyle tocellWidth - Changed and simplified hooks to `didParseCell, willDrawCell, didDrawCell, didDrawPage
- Deprecated the old initialization
doc.autoTable(columns, data, options) - Deprecated
autoTableHtmlToJson()in favour of new html option - Deprecated old way of getting previous autoTable instance
doc.autoTable.previous
v3 RC 2
Compared to RC 1 this release has some fixes to colspan/rowspans and width calculations for linebreak columns.
v3 RC 1
v2.3.5
Bump
v2.3.4
v2.3.3
- Support for JSPDF 1.4
v2.3.2
- Remove extraneous log
- Add access to column definition through
column.rawin hooks
v2.3.1
Fix for multi page horizontal tables, see http://stackoverflow.com/questions/41686658/jspdf-autotable-how-do-i-display-two-tables-side-by-side-that-span-multiple-pag
v2.3.0
- Methods for setting global options added:
jsPDF.autoTableSetDefaults({ ... }) - Method for setting document default options added:
doc.autoTableSetDefaults({ ... }) - Use
doc.autoTable.previous.finalYinstead ofdoc.autoTableEndPosY - Use
jsPDF.autoTableSetDefaults({addPageContent: function() {}})instead of thedoc.autoTableAddPageContentmethod.