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
For your issue, mpdf is better than DomPDF and others. it has following features
Add custom fonts
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
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.