Open Stophface opened 7 months ago
I am facing the same issue. This fails
page.drawText(customTextWithNewLine, {
x: textX,
y: textY,
size: fontSize,
font,
});
I faced a similar error with character encoding. But understanding the problem with the documentation and using the Noto font instead of the default fonts, works for me.
What were you trying to do?
I am trying to add a
\n
to my text to create a line break. The text then should be drawn onto the page withpage.drawText()
.How did you attempt to do it?
Pretty straight foward
I then try to draw this
What actually happened?
I get the error
What did you expect to happen?
I expect to be able to add
\n
to the text to insert a line break. The thing I do not understand is, I am pretty much doing the same in this functionThe result of
I can draw on the page
without getting an error, eventhouh in
wrapText()
I add an\n
.How can we reproduce the issue?
Version
1.17.1
What environment are you running pdf-lib in?
Browser
Checklist
Additional Notes
No response