I wanna create an Arabic pdf as same as the file witch I had in ms Execl format. While creating the pdf using tcpdf in php the Arabic charactors are displyaed as '????' marks.
The characters are copied from my excel file
$htmlcontent2 = '<span color="#0000ff">"مجوهرات السليمان"This is Arabic "مجوهرات السليمان" Example With TCPDF.</span>';
$pdf->WriteHTML($htmlcontent2, true, 0, true, 0);
the output file display as below,
??? ???? ?????? ??????This is Arabic "??????? ????????" Example With TCPDF.
I solved this issue by adding the following line:
$pdf->SetFont('aealarabiya', '', 18);
It turned out that you need to set the proper font type to remove those ugly ????? characters.
The exmaple mentioned in this link was very useful to solve this issue.
I solved this issue by following this step:
Copy these files
aealarabiya.ctg.z
aealarabiya.z
aealarabiya.php
Paste in this location: your WHCMS root / includes/fonts if fonts folder doesn't exist create it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With