What is Incisor?
Tutorials
Key Concepts
Reddit
Stack Overflow
Configuration Settings
Deprecation Schedule

PdfCell()

A PdfCell is an object that resides within a PdfRow and can contain PdfParagraphs, PdfImages and PdfTables within it. [NON-INSTANTIABLE]

new PdfCell()

A PdfCell is an object that resides within a PdfRow and can contain PdfParagraphs, PdfImages and PdfTables within it. [NON-INSTANTIABLE]

MEMBERS

backgroundColor :Color

The background color of this PdfCell.

Default Value:
  • Color(1,1,1,1)

bottomBorderColor :Color

The color of the bottom border in this PdfCell.

Default Value:
  • Color(0,0,0,1)

bottomBorderThickness :number

The thickness of the bottom border in this PdfCell.

Default Value:
  • 1

diagonalDownColor :Color

The color of the diagonalDown (top left to bottom right diagonal) in this PdfCell.

Default Value:
  • Color(1,1,1,1)

diagonalDownThickness :number

The thickness of the diagonalDown (top left to bottom right diagonal) in this PdfCell.

Default Value:
  • 0

diagonalUpColor :Color

The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfCell.

Default Value:
  • Color(1,1,1,1)

diagonalUpThickness :number

The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfCell.

Default Value:
  • 0

inheritedTypes :object

Dictionary object listing all of the types this object is compatible with.

justificationH :string

The horizontalJustifcation of this PdfCell. For acceptable values, see 'nc.constants.justfications'.

Default Value:
  • "center"

justificationV :string

The verticialJustifcation of this PdfCell. For acceptable values, see 'nc.constants.justfications'.

Default Value:
  • "center"

leftBorderColor :Color

The color of the left border in this PdfCell.

Default Value:
  • Color(0,0,0,1)

leftBorderThickness :number

The thickness of the left border in this PdfCell.

Default Value:
  • 1

leftIndent :number

The left indentation amount of this PdfCell.

Default Value:
  • 0

rightBorderColor :Color

The color of the right border in this PdfCell.

Default Value:
  • Color(0,0,0,1)

rightBorderThickness :number

The thickness of the right border in this PdfCell.

Default Value:
  • 1

rightIndent :number

The right indentation amount of this PdfCell.

Default Value:
  • 0

spaceAfter :number

The space size that will be added after this PdfCell.

Default Value:
  • 0

spaceBefore :number

The space size that will be added before this PdfCell.

Default Value:
  • 0

topBorderColor :Color

The color of the top border in this PdfCell.

Default Value:
  • Color(0,0,0,1)

topBorderThickness :number

The thickness of the top border in this PdfCell.

Default Value:
  • 1

type :string

Type identifier.

METHODS

addImage(imagePath, isPathRelative (opt), justificationH (opt), justificationV (opt)) returns {PdfImage}

Adds a new Image to this PdfCell and returns it.

Parameters:
Name Type Attributes Default Description
imagePath string  

The path of the image being added within this PdfCell.

isPathRelative boolean <optional>
 

Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true. [DEFAULT: true]

justificationH string <optional>
 

The horizontal justification of the image being added to this PdfCell. For acceptable values, see 'nc.constants.justfications'. [DEFAULT: "center"]

justificationV string <optional>
 

The vertical justification of the image being added to this PdfCell. For acceptable values, see 'nc.constants.justfications'. [DEFAULT: "center"]

Returns:
PdfImage

addParagraph() returns {PdfParagraph}

Adds a new PdfParagraph to this PdfSection and returns it. A PdfParagraph is simply a block of text.

Returns:
PdfParagraph

addTable(numRows, numCols, columnWidths) returns {PdfTable}

Adds a new PdfTable to this PdfCell and returns it.

Parameters:
Name Type Attributes Default Description
numRows number    

The number of rows to add to this PdfTable.

numCols number    

The number of columns to add to each PdfRow in this PdfTable.

columnWidths Array.<number> | number    

An array containing the desired widths for each column in this PdfTable.

Returns:
PdfTable

mergeCellRight(numberOfCells)

Merges this cell right by a specificed number of cells.

Parameters:
Name Type Attributes Default Description
numberOfCells number    

setBorder(thickness, color)

Sets the thickness and color for all borders in this PdfCell.

Parameters:
Name Type Attributes Default Description
thickness number    

The thickness to set all borders to.

color Color    

The color to set all borders to.