I want to write some Turkish character to pdf with reportlab. i used fallowing code to do this.
c = Canvas("test.pdf")
data="ğçİöşü"
p = Paragraph(data.decode('utf-8'), style=styNormal)
but it doesn’t show my data at pdf.
ouput: ■ç■ö■ü
As explained in this answer to a similar question, you need to use a font which supports your characters.
In short, try this:
pdfmetrics.registerFont(TTFont('Verdana', 'Verdana.ttf'))
c.setFont("Verdana", 8)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With