question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event for start printing row and cell

See original GitHub issue

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");
    }
});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nielsnl68commented, Sep 1, 2021

I like this small extension to the inbuild table creator more then adding a bigger plugin, which for me is a lot if over kill.

And maybe it can also fix my other issue not knowing what the end of the table is, #3213

0reactions
HackbrettXXXcommented, Dec 21, 2020

I agree that it won’t increase the bundle size very much. But it will increase the size and complexity of the API and it will increase maintenance effort. That’s why I don’t think we should add it to the jsPDF core.

And you can always create your own plugin: copy the cell.js plugin code, add your changes and use it as external plugin. Should work pretty easy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event for start printing row and cell #3038 - parallax/jsPDF
The purpose of this feature is to provide an event before printing a row or cell that the user decides to change the...
Read more >
Printing the contents of an event list - IBM
You can print the current view of an event list. Different print options are available for UNIX and Windows. On UNIX, you can...
Read more >
Events | Tabulator
Tabulator provides a range of events, triggered during table usage that allow you to ... Table Events; Column Events; Row Events; Cell Events;...
Read more >
How To Get Row Data From A Cell's BeforePrint Event
Hi Stephen, Use the XtraReport.GetCurrentRow()method to access the processed record. We look forward to your feedback once you've had the ...
Read more >
Excel VBA Events - An Easy (and Complete) Guide
Excel VBA Events allow you to run a macro when a specific event occurs. An event could be an action such as opening...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found