I am generating a PDF file from CSV file. While I tried to write BANGLA language it just broke the words. Here is my code:
from fpdf import FPDF
pdf = FPDF(orientation='L', unit='mm', format='A5')
pdf.add_page()
pdf.add_font('kalpurush','','fileLocation/kalpurush.ttf', uni=True)
pdf.set_font('kalpurush','',18)
pdf.set_xy(10,10)
pdf.set_text_color(0, 0, 0)
pdf.cell(w = 0,h=0.0, align='L', txt=u"শিরোনাম", border=0)
pdf.output("test.pdf")
The output file for the text (শিরোনাম) showing like this:
I have tried different .ttf file also. But didn't find any solution!
You can use images instead of text.