-
-
Notifications
You must be signed in to change notification settings - Fork 637
Open
Labels
Description
Hi. I have a problem with colspan column when use with horizontalPageBreak. I expected that header3 will repeat when horizontalPageBreak to another page. Any idea?
I set data of header like this or maybe I do it wrong?
const daylist = ['day1'........]
const headers = [
[
{
content: "header1",
rowSpan: 2,
styles: {halign: "left", valign: "middle", minCellWidth: 50},
},
{
content: "header2",
rowSpan: 2,
styles: {halign: "left", valign: "middle", minCellWidth: 500},
},
{
content: "header3",
colSpan: daylist.length,
styles: {halign: "left", valign: "middle"},
},
],
daylist,
];
doc.setFont("Arial Unicode MS");
doc.autoTable({
head: headers,
body: rows.map((row) => Object.values(row)),
styles: {
font: "Arial Unicode MS",
halign: "center",
overflow: "linebreak",
},
horizontalPageBreak: true,
horizontalPageBreakBehaviour: "immediately",
horizontalPageBreakRepeat: [0, 1],
tableWidth: "warp",
pageBreak: "avoid",
rowPageBreak: "auto",
});
aaronmg241 and TheKineticz

