bvalgard / create-pdf-with-python-fpdf2

How to create a PDF with Python using fpdf2. You can watch the YouTube videos on this here https://youtube.com/playlist?list=PLjNQtX45f0dR9K2sMJ5ad9wVjqslNBIC0
54 stars 48 forks source link

create pdf with non english text #5

Open mahshidrz opened 2 years ago

mahshidrz commented 2 years ago

Good job with these amazing projects. I want to create a pdf with the Persian text. and issued with bellow error. I appreciate it if you could help me

code: image

error: p = self.pages[n].encode("latin1") if PY3K else self.pages[n] UnicodeEncodeError: 'latin-1' codec can't encode characters in position 204-209: ordinal not in range(256)

ay15172073139 commented 2 months ago

Have you solved it ?