function renderCell(cell, rowStruct) {
  const cellRenderer = () => {
    // Render cell background
    if (cell.backgroundColor != null) {
      this.document
        .save()
        .rect(cell.x, cell.y, cell.width, cell.height)
        .fill(cell.backgroundColor)
        .restore();
    }

    // Render border
    renderBorder.call(
      this,
      cell.border,
      cell.borderColor,
      cell.x,
      cell.y,
      cell.width,
      cell.height,
    );

    // Debug cell borders
    if (cell.debug) {
      this.document.save();
      this.document.dash(1, { space: 1 }).lineWidth(1).strokeOpacity(0.3);

      // Debug cell bounds
      this.document
        .rect(cell.x, cell.y, cell.width, cell.height)
        .stroke('green');

      this.document.restore();
    }

    // Render text
    if (cell.text) renderCellText.call(this, cell);
  };

  if (rowStruct) accessibleCell.call(this, cell, rowStruct, cellRenderer);
  else cellRenderer();
}
Render a cell

@this PDFTable
@memberOf PDFTable
@param {SizedNormalizedTableCellStyle} cell
@param {PDFStructureElement} rowStruct
@private