ReportLab - How to add a space between words
2 answers
I doubt there is an easy solution for this.
As a workaround, you can try adding a blank (color or background color) 1px x 1px image in your paragraph and rescaling it to the desired width.
<font size=10>word1<img src="../path/to/image" width="10" />word2</font>
Another (tedious) solution would be to host your paragraph yourself with text objects created by canvas.beginText (x, y).
textobject = canvas.beginText(x, y)
textobject.setWordSpace(10)
textobject.textLine("word1 word2")
... (setting other parameters such as font etc.)
canvas.drawText(textobject)
Hope it helps.
+2
source to share