end() {
    // Flush any remaining cells
    while (this._rowBuffer?.size) this.row([]);
    this._ended = true;
    accommodateCleanup.call(this);
    return this.document;
  }
Indicates to the table that it is finished,
allowing the table to flush its cell buffer (which should be empty unless there is rowSpans)

@returns {PDFDocument} the document