【发布时间】:2023-10-02 05:31:01
【问题描述】:
我遇到了列标题文本和行文本在单词中间不正确中断的问题(见附件)。在附件中,我预计“长文本列”会受到更多挤压,这将增加其他列的宽度并增加行的高度。
我使用的代码是:
public exportToPDF(reportName: string, cols: any, rows: any) {
var doc = new jsPDF('landscape');
doc.text(15, 40, "Report");
var options = {
margin: { horizontal: 5 },
bodyStyles: { valign: 'top' },
styles: { overflow: 'linebreak', overflowColumns: false },
headerStyles: {
fillColor: [51, 122, 183],
textColor: [255],
halign: 'center'
},
theme: 'grid'
};
doc.autoTable(cols, rows, options);
doc.save('Report.pdf');
}
【问题讨论】:
-
我的桌子上有同样的问题。我有一个大文本列,它的扩展方式与您的图片相同。我可以这样解决:*.com/questions/38787437/…
标签: jspdf jspdf-autotable