-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Executing the following code snippet in live demo is expected to create a table that all its rows including the header center
align.
var headers = [
{name: "id", align: "center", width: 100},
{name: "name", align: "center", width: 100}
];
var data = [
{id: "0", name: "Test 1"},
{id: "1", name: "Test 2"}
];
var doc = new jsPDF({ orientation: "landscape" });
doc.table(1, 1, data, headers);
But contrary to expectations, the header has been left
align!
The problem seems to be from the bottom line:
Should be use headers
instead of headerNames
headerAligns = headers.map(function(header) {