
const doc = new jsPDF('p', 'pt', 'a4');
doc.autoTable({
head: headerdata, // array of arrays
theme: 'grid',
body: bodydata, // arry of arrays
startY: doc.autoTable.previous.finalY,
Padding: { top: 20, right: 15, bottom: 20, left: 25, },
styles: {
lineColor: [220, 220, 220],
lineWidth: 0.5,
overflow: 'linebreak',
},
willDrawCell: (data) => {
if (data.section === 'body' && data.column.dataKey === 2) {
doc.setFillColor(239, 154, 154);
doc.roundedRect(data.cell.textPos.x + 3, data.cell.textPos.y + 3, data.cell.width, data.cell.height, 5, 5, 'FD');
}
},
headStyles: { fillColor: [249, 249, 251], textColor: [34, 34, 34], },
});
doc.save('test.pdf');If you have been searching for the right note-taking or knowledge management app, you have…
Looking for AnyType alternatives? You're not alone. AnyType has gained popularity as a privacy-focused, local-first…
Notion is a popular all-in-one workspace, but many users seek alternatives for different needs (free…
Logseq is a beloved tool in the personal knowledge management (PKM) community. It's free, open-source,…
Looking for a Webshare alternative? You're not alone. Webshare is a popular proxy service with…
Docker changed software development forever. It made containers accessible, gave developers a simple workflow, and…