Skip to content

Event for start printing row and cell #3038

Closed
@mojtaba-khallash

Description

@mojtaba-khallash

The purpose of this feature is to provide an event before printing a row or cell that the user decides to change the text color or font size or bold the text based on the row/column number or the data in that cell.

doc.table(1, 1, data, headers, {
    rowStart: function(e) {
        if (17 < e.row && e.row < 36)
          doc.setTextColor(255,0,0);
        else
          doc.setTextColor(0,0,0);
    },
    cellStart: function(e) {
        if (e.data > 80)
          doc.setFont(undefined, "bold");
        else
          doc.setFont(undefined, "normal");
    }
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions