Answer the question
In order to leave comments, you need to log in
How to transfer backex without \n to pdf?
text = "Hello\nThis is a multiline text\nHere we have to handle line height manually\nAnd check that every line uses not more than pagewidth"
c = canvas.Canvas("test.pdf")
for i, line in enumerate(text.splitlines()):
c.drawString(1 * cm, 29.7 * cm - 1 * cm - i * cm, line)
c.save()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question