0

I have made a web based software based on YII in which there is two functionality. 1) export to excel 2) export to PDF

The software is in two languages.

  1. English
  2. Gujarati.

To input either in Gujarati and English, I am using "Google input tools"

To export, I am using excelview YII extension for excel and tcpdf for exporting to PDF. Though exporting to excel is working fine for both languages, it is not working for PDF. Font rendering has issues.

The issue is same as here Which PDF Generation API (Java) supports Gujarati Font?

I dont know what to do and have tried everything. Can we generate the pdf without specifying any fonts? The setFonts function of tcpdf might be causing an issue?

I have not used any fonts on the site for Gujarati. I am only using UTF-8 encoding and database with UTF-8 encoding and columns with UTF8-general-ci.

Any help will be appreciated.

Community
  • 1
  • 1

1 Answers1

0

Gujarati is an Indic text, yes? TCPDF does not support Indic text rendering, even if you have the necessary fonts. (Someone correct me if version 6 of TCPDF addresses this, but I don't see anything in the changelog that would indicate that it does.)

See my answer on this query for malayalam for more information and some potential alternatives:

How can I create Malayalam PDF using TCPDF in PHP?

Community
  • 1
  • 1
EPB
  • 3,939
  • 1
  • 24
  • 26