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.

3.4.5 Headers in Basic autotable not displaying?

See original GitHub issue

Simon, thanks for the work you’ve put into this. With 3.4.5, I’m suddenly not seeing column headers using the basic autotable. Here’s the relevant code:

doc = new jsPDF({
    orientation: 'portrait',
    unit: 'pt',
    format: 'letter'
});

...

doc.autoTable(columns, rows, {
    styles: {
        fontSize: 8.5,
        textColor: 0,
        cellPadding: {bottom: 10}
    },
    headerStyles: {
        fontSize: 10,
        halign: "center",
        textColor: 255
    },
    columnStyles: {0: {fontStyle: 'bold'}},
    margin: {
        top: 50
    }
});

columns is a one-dimension array and rows is a two-dimension array.

It’s been years since I messed with this code, so if you’ve changed the API feel free to tell me to go read the docs. I just thought I’d check in case it was a bug with the new version. Thank you!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tobyrushcommented, Apr 27, 2020

Yes, it works now! Thanks for addressing this so quickly!

0reactions
simonbengtssoncommented, Apr 27, 2020

Fixed now in 3.4.6. Let me know if it works for you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsPDF auto-table header text not working and how to render ...
Currently the doc.text only takes string as a parameter. i want to render something like : "Main Title small title " to the...
Read more >
jspdf-autotable/README.md - UNPKG
- `autoTableAddPage` Use in the hooks to continue the table on the next page. Adds a new header automatically. 159. 160, ### Upgrade...
Read more >
AutoTable - Table plugin for jsPDF - npm
This jsPDF plugin aims at making it easy to generate pdf tables either from HTML or directly from Javascript. Check out the demo...
Read more >
AutoVue Client/Server Deployment Viewing Configuration Guide
by selecting Options, Show Panels, and then Main Panel. □. You can control whether or not to display the markup tree in the...
Read more >
Storm Water Management Model User's Manual Version 5.1
Launch EPA SWMM if it is not already running and select File >> New from the Main. Menu bar to create a new...
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