Closed psalaets closed 4 years ago
For arbitrary blank lines / whitespace, I usually use cells with a padding, e.g.:
doc.cell("Before whitespace", {paddingBottom: 20})
This also works with empty cells (though I rarely use that):
doc.cell({paddingBottom: 20})
It might be worth thinking about a dedicated API for that 🤔
(thanks for the overview btw!)
Hi, thank you for this library.
I am trying to insert arbitrary blank lines in my PDF. The effect should be similar to when a user presses the Enter key multiple times in a Word doc.
This is what I've tried so far
doc.text().br()
doc.text('').br()
doc.text(' ').br()
doc.text(' '.repeat(2)).br()
doc.text(' ')
doc.text(' '.repeat(2))
doc.text(' '.repeat(3))
doc.text('\n')
doc.text('\r\n')
doc.text(' \n')
doc.text('\u000A')
doc.text('\u000D')
doc.text('\u200B')
The attempts that worked seem a little hacky.
Is there a recommended way to do this in pdfjs 2.4.1?