Methods
(inner) arrayMax(array, comparisonFn) → {number}
- Source:
Return the maximum value from an array
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | |
comparisonFn |
Returns:
- Type
- number
(inner) calculateLineHeight(headerNames, columnWidths, model) → {number}
- Source:
Calculate the height for containing the highest column
Parameters:
Name | Type | Description |
---|---|---|
headerNames |
Array.<String> | is the header, used as keys to the data |
columnWidths |
Array.<Integer> | is size of each column |
model |
Array.<Object> | is the line of data we want to calculate the height of |
Returns:
lineHeight
- Type
- number
(inner) cell(x, y, w, h, txt, ln, align) → {jsPDF}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number | |
y |
number | |
w |
number | |
h |
number | |
txt |
string | |
ln |
number | lineNumber |
align |
string |
Returns:
jsPDF-instance
- Type
- jsPDF
(inner) cellAddPage()
- Source:
(inner) cellInitialize()
- Source:
(inner) getTextDimensions(txt) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
txt |
string |
Returns:
dimensions
- Type
- Object
(inner) printHeaderRow(lineNumber, new_page)
- Source:
Output the store header row
Parameters:
Name | Type | Description |
---|---|---|
lineNumber |
number | The line number to output the header at |
new_page |
boolean |
(inner) setHeaderFunction(func)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
func |
function |
(inner) setTableHeaderRow(config)
- Source:
Store the config for outputting a table header
Parameters:
Name | Type | Description |
---|---|---|
config |
Array.<Object> | An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell except the ln parameter is excluded |
(inner) table(xopt, yopt, dataopt, headersopt) → {jsPDF}
- Source:
Create a table from a set of data.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
x |
Integer |
<optional> |
: left-position for top-left corner of table |
y |
Integer |
<optional> |
top-position for top-left corner of table |
data |
Array.<Object> |
<optional> |
As 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) |
Returns:
jsPDF-instance
- Type
- jsPDF