Closed Alexis-Falquier closed 3 weeks ago
Hi @Alexis-Falquier
For text regions, the goal is to group together the settings for rendering several lines of text: https://py-pdf.github.io/fpdf2/TextRegion.html
However, if you need to render a single line of text, you can use:
FPDF.write()
that has a h
parameter: https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.writeFPDF.cell()
: https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.cellFPDF.multi_cell()
: https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.multi_cellI'll let @gmischler correct me if need be, as he designed the text regions API 🙂
Hi
Unless you want to add something on the subject @Alexis-Falquier and @gmischler, I'm probably going to close this issue before the end of the year 🙂
Currently to write a block of text and adjust the line height one would need to do this:
while it isnt much, it seems logical for the write() function to have the ability to manipulate the text it is writing and therefore have line height as a parameter, as such:
pdf.write(text=<block of text>, line_height=1.3)
In fact it would make sense that write() have most of the parameters available in text_columns() is there a reason that they are not?