Skip to content

Releases: simonbengtsson/jsPDF-AutoTable

v3.0.4

Choose a tag to compare

@simonbengtsson simonbengtsson released this 22 Jan 13:26

Fixes #424

v3.0.2

Choose a tag to compare

@simonbengtsson simonbengtsson released this 05 Jan 15:09

Added minCellWidth option.

v3.0.0

Choose a tag to compare

@simonbengtsson simonbengtsson released this 05 Jan 13:52

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: boolean for using some basic css styles when table initialized from html
  • Added includeHiddenHtml: boolean option
  • Added showFooter option (similar to showHeader)
  • Added footerStyles option (similar to headerStyles)
  • Added rowPageBreak option
  • 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.previous to doc.lastAutoTable
  • Changed default overflow method to linebreak (previously it was ellipsize)
  • Changed rowHeight style to cellHeight
  • Changed columnWidth style to cellWidth
  • 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

v3 RC 2 Pre-release
Pre-release

Choose a tag to compare

@simonbengtsson simonbengtsson released this 01 Dec 13:45

Compared to RC 1 this release has some fixes to colspan/rowspans and width calculations for linebreak columns.

v3 RC 1

v3 RC 1 Pre-release
Pre-release

Choose a tag to compare

@simonbengtsson simonbengtsson released this 28 Oct 14:22

Api and docs finalized for v3. Checkout the docs in the v3 branch

v2.3.5

Choose a tag to compare

@simonbengtsson simonbengtsson released this 27 Aug 20:05

Bump

v2.3.4

Choose a tag to compare

@simonbengtsson simonbengtsson released this 28 May 21:21

Additional fix for JSPDF 1.4 (#359)

v2.3.3

Choose a tag to compare

@simonbengtsson simonbengtsson released this 24 May 07:31
  • Support for JSPDF 1.4

v2.3.2

Choose a tag to compare

@simonbengtsson simonbengtsson released this 23 May 14:16
  • Remove extraneous log
  • Add access to column definition through column.raw in hooks

v2.3.1

Choose a tag to compare

@simonbengtsson simonbengtsson released this 17 Jan 13:00