Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 574 Bytes

table.md

File metadata and controls

39 lines (27 loc) · 574 Bytes

Table

.header([opts])

Add a table header. Returns a Row Object.

Example:

const table = doc.table({
  widths: [200, 200],
  borderWidth: 1,
})

const header = table.header()
header.cell('Header Left')
header.cell('Header Right')

.row([opts])

Starts a table row. Returns a Row Object.

Options:

  • minHeight (default: 0) - the minimum height of the row

Example:

const table = doc.table({
  widths: [200, 200],
  borderWidth: 1,
})

const row = table.row()
row.cell('Cell Left')
row.cell('Cell Right')