0

I used mysql_query ("set character_set_results='utf8'"); to fetch the unicode(tamil) values stored in my database. But the output is just like

Status: ?????

Is there any possible fpdf functions to fetch tamil values??

Ashish Kakkad
  • 23,586
  • 12
  • 103
  • 136
Jegannath
  • 29
  • 2
  • 14

1 Answers1

2

First you should make your font

Do can do it by the following steps

Step 1 : Go to makefont section of fpdf

Step 2 : Upload the font you required (Your tamil font)

Step 3 : Choose the Endocing and Upload, then it will generate a .php as .z file. Download it

Step 4 : Add those two to your font folder of your font inside your

Step 5 : Then add those fonts in your .php file where you include the fonts

i.e.,

$fpdf->AddFont('Tamil','','Tamil-Font.php');
$fpdf->SetFont('Tamil','',11); 

Add these files to the following folder: fpdf/font (This is the default folder structure that you need to download in order for your fpdf to work)

Alternative Method

You can simply inlcude the font in your font folder and add these lines in your .php file (Make sure about the the path in your system, you should have .z files in this method too)

<?php
require('makefont/makefont.php');
MakeFont('c:\\Windows\\Fonts\\yourtamilfont.ttf','cp1252');
?>
Sulthan Allaudeen
  • 11,330
  • 12
  • 48
  • 63