fpdf2 write - how to get new lines printed instead of '\n'?

67 Views Asked by At

I want to print some text in my pdf as follows;

text = self.dict_text_for_pdf[category]
self.pdf.write(_c.text_line_height, text)

Inside the text I have some line break characters. But instead of a new line being printed I actually get "\n" printed instead. According to the documents this should work; https://py-pdf.github.io/fpdf2/LineBreaks.html. How do I fix this?

0

There are 0 best solutions below