# cell

### Methods

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

Source:
  - modules/cell.js, line 218

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | number |
`y` | number |
`width` | number |
`height` | number |
`text` | string |
`lineNumber` | number | lineNumber
`align` | string |

##### Returns:

jsPDF-instance

Type
  jsPDF

#### (inner) cellAddPage()

Source:
  - modules/cell.js, line 192

#### (inner) cellInitialize()

Source:
  - modules/cell.js, line 208
Deprecated:
  - Yes

#### (inner) getTextDimensions(txt) → {Object}

Source:
  - modules/cell.js, line 155

##### Parameters:

Name | Type | Description
--- | --- | ---
`txt` | string |

##### Returns:

dimensions

Type
  Object

#### (inner) printHeaderRow(lineNumber, new_page)

Source:
  - modules/cell.js, line 455

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:
  - modules/cell.js, line 144

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | function |

#### (inner) setTableHeaderRow(config)

Source:
  - modules/cell.js, line 441

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 lineNumber parameter is excluded

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

Source:
  - modules/cell.js, line 280

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> | 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)

##### Returns:

jsPDF-instance

Type
  jsPDF