from fpdf import FPDF pdf = FPDF() pdf.add_page() # Add a DejaVu Unicode font (uses UTF-8) # Supports more than 200 languages. For a coverage status see: # http://dejavu.svn.sourceforge.net/viewvc/dejavu/trunk/dejavu-fonts/langcover.txt pdf.add_font('DejaVu', '', 'DejaVuSansCondensed.ttf', uni=True) pdf.set_font('DejaVu', '', 14) text = u""" English: Hello World Greek: Γειά σου κόσμος Polish: Witaj świecie Portuguese: Olá mundo Russian: Здравствуй, Мир Vietnamese: Xin chào thế giới Arabic: مرحبا العالم Hebrew: שלום עולם """ for txt in text.split('\n'): pdf.write(8, txt) pdf.ln(8) # Add a Indic Unicode font (uses UTF-8) # Supports: Bengali, Devanagari, Gujarati, # Gurmukhi (including the variants for Punjabi) # Kannada, Malayalam, Oriya, Tamil, Telugu, Tibetan # Select a standard font (uses windows-1252) pdf.set_font('Arial', '', 14) pdf.ln(10) pdf.write(5, 'This is standard built-in font') pdf.output("unicode.pdf", 'F')