Arabic Font Not Displaying Properly in pdf

I found some developers facing issues when generating PDF for Invoice or Doc files in PHP, In the Arabic Language. This blog all about generates PDF with Arabic font In PHP hasslefree. Here I will show you the example and some points so that you can easily convert HTML to PDF with the Arabic Language.



For Generating PDF in the Arabic Language, we have to Use TCPDF.

Step-1: download TCPDF library files.

Click here to Download tcpdf files.



Add this files to you PHP file, like below

 

Step-2: Set font which is going to supports Arabic.

Here Below Example, I am able to Generate an Invoice for My Client In the Arabic Language.

HTML to pdf generation in Arabic



Code Goes Here:

 

Here You have to download the TCPDF zip file and unzip in your root folder, then run this PHP file, you will get the pdf in the Arabic language. Any Issues Leave a comment below, I will try to fix your problem.

Recommended Posts

 



Read Also: Hindi Font Not Displaying Properly in pdf

I hope this blog helps you a lot.

 



 

Tags:

Advertisements