Hindi Font with DOMPDF in Codeigniter

后端 未结 2 2087
[愿得一人]
[愿得一人] 2021-01-26 20:25

I have used DOMPDF library in codeigniter to fetch data from mysql. But there are some fields in my table is in Hindi (unicode form of Hindi) when I am trying to generate PDF fo

2条回答
  •  不知归路
    2021-01-26 21:15

    For your issue, mpdf is better than DomPDF and others. it has following features

    1. Add custom fonts

    2. Full Unicode support

      It supports more than 100 languages including English, Hindi, Tamil, Sinhala, KATAKANA, HIRAGANA, ETHIOPIC,THAI, MALAYALAM, KANNADA, TELUGU, GUJARATI, BENGALI , ARABIC, GREEK and many more by default

    3. Complex scripts support

    3.1 Right-to-left languages

    Arabic languages and Hebrew are written in a right-to-left direction (RTL). mPDF recognises both Arabic and Hebrew languages and reverses text direction automatically.

    ألسّلام عليكم שלום

    3.2 Indic languages, Lao, Tibetan etc

    Other complex scripts require some processing of characters before display. For example some vowels consist of 2 characters, to be placed before and after the adjacent consonant e.g.

    U+0D1C + U+0D4C [vowel AU] = [written together as ജൌ]

    ജ + ൌ = ജൌ

    Consonant conjuncts are where two adjacent characters are written as a single ‘conjunct’ form e.g.

    प + ॡ = पॣ

    3.3 Vertical writing

    Vertical writing is not supported by mPDF (e.g. Mongolian and Phags-pa) although the individual characters can be displayed using suitable fonts.

    1. TrueType Collections
    2. Unicode Supplementary Planes

提交回复
热议问题