Back to Jspdf

cell

docs/module-cell.html

4.2.13.5 KB
Original Source

Methods

(inner) cell(x, y, width, height, text, lineNumber, align) → {jsPDF}

Source:

Parameters:
NameTypeDescription
xnumber
ynumber
widthnumber
heightnumber
textstring
lineNumbernumber

lineNumber

| | align | string | |

Returns:

jsPDF-instance

Type jsPDF

(inner) cellAddPage()

Source:

(inner) getTextDimensions(txt) → {Object}

Source:

Parameters:
NameTypeDescription
txtstring
Returns:

dimensions

Type Object

(inner) printHeaderRow(lineNumber, new_page)

Source:

Output the store header row

Parameters:
NameTypeDescription
lineNumbernumber

The line number to output the header at

| | new_page | boolean | |

(inner) setHeaderFunction(func)

Source:

Parameters:
NameTypeDescription
funcfunction

(inner) setTableHeaderRow(config)

Source:

Store the config for outputting a table header

Parameters:
NameTypeDescription
configArray.<Object>

An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell except the lineNumber parameter is excluded

|

(inner) table(xopt, yopt, dataopt, headersopt) → {jsPDF}

Source:

Create a table from a set of data.

Parameters:
NameTypeAttributesDescription
xInteger<optional>

: left-position for top-left corner of table

| | y | Integer | <optional>
|

top-position for top-left corner of table

| | data | Array.<Object> | <optional>
|

An array of objects containing key-value pairs corresponding to a row of data.

| | headers | Array.<String> | <optional>
|

Omit or null to auto-generate headers at a performance cost

| | config.printHeaders | Object | <optional>
|

True to print column headers at the top of every page

| | config.autoSize | Object | <optional>
|

True to dynamically set the column widths to match the widest cell value

| | config.margins | Object | <optional>
|

margin values for left, top, bottom, and width

| | config.fontSize | Object | <optional>
|

Integer fontSize to use (optional)

| | config.padding | Object | <optional>
|

cell-padding in pt to use (optional)

| | config.headerBackgroundColor | Object | <optional>
|

default is #c8c8c8 (optional)

| | config.headerTextColor | Object | <optional>
|

default is #000 (optional)

| | config.rowStart | Object | <optional>
|

callback to handle before print each row (optional)

| | config.cellStart | Object | <optional>
|

callback to handle before print each cell (optional)

|

Returns:

jsPDF-instance

Type jsPDF