pdfkit/lib/mixins/table.js
Jake Holland 033ba3426b
Add support for tables (#1577)
* Add page size utilities

- Added page.contentWidth
- Added page.contentHeight

* Add table support

- Tables support cell customization (including colors)
- Tables also support rotatable text (with alignment support)
- Tables have accessibility support

* chore: fix code generation context

- code generation now respects the current document positioning to allow use of page dependent operations

* chore: remove comments from build

* removed unnecessary config optimisations

* Optimize table minification

* Performance improvements to tables

* Improve font handling in tables
2025-02-24 07:49:25 -03:00

16 lines
322 B
JavaScript

import PDFTable from '../table/index';
export default {
initTables() {
this._tableIndex = 0;
},
/**
* @param {Table} [opts]
* @returns {PDFTable} returns the table object unless `data` is set,
* then it returns the underlying document
*/
table(opts) {
return new PDFTable(this, opts);
},
};