2

我正在使用带有overflow: 'linebreak'创建 pdf 的选项的 jspdf-autoTable。问题是一些长文本与下一列重叠。例如,如果我的文本是“Hai hello welcome”,它将打印为“Hai hello wel”,剩余的“come”重叠在下一列。如何在不重叠下一列的情况下使用换行符?

注意:在我更改drawCell method.

我也得到了这种奇怪的行为:

我发送的内容:

Paragraph writing is the foundation of all essay writing whether the form is expository persuasive narrative or creative

在我的 drawCell 方法中:

["Paragraph writing is the foundation of all","essay writing whether the form is expository","persuasive narrative or creative"]

我不知道为什么它会自动将字符串分成一个数组。这可能是重叠问题的原因吗?

4

1 回答 1

1

预计字符串会变成一个数组。jspdf 库将在新行上打印数组中的每个字符串。如果要使用钩子更改字符串,请使用didParseCell.

于 2016-08-11T12:42:28.780 回答