Topic: Arabic font in PDF not showing in windows server

So, I have developed report in arabic and it is shown correctly in Linux server. When it is deployed to Windows server, it is failed although I have installed alarabiya font and arabic language pack for windows. I am sure there is nothing wrong in my code because it is shown in Linux. Any method to solve this in Windows?

Re: Arabic font in PDF not showing in windows server

@barbarian

When you say it failed..do you get any pdf output or the Arabic text is not showing? Is there a Latin text showing?

Re: Arabic font in PDF not showing in windows server

rafat wrote:

@barbarian

When you say it failed..do you get any pdf output or the Arabic text is not showing? Is there a Latin text showing?


The arabic text is replaced as some sort of symbol.

4 (edited by rafat 08/21/2019 11:04:18 am)

Re: Arabic font in PDF not showing in windows server

Ok then .. I think your translation file is in the wrong directory... This is tricky with wamp or xampp..luckily this thread fixed the problem as it is to do with some php bug only on windows environment.

https://frontaccounting.com/punbb/viewtopic.php?id=7113

basically you need to copy your .mo and .po files to your language locale language folder. and not ar_EG folder.

5 (edited by barbarian 08/21/2019 11:50:55 am)

Re: Arabic font in PDF not showing in windows server

The arabic text is not from the translation. It is the data. Like customer name and item name. So, I don't think this is po and mo problem. I believe this is windows problem because my laptop using windows 8.1 also cannot display arabic PDF.

Re: Arabic font in PDF not showing in windows server

@barbarian,
It helps if you include a screen shot of the report ..if you can.
Since its working with Linux but not Windows.. are you migrating this data into Windows or entering it directly in Windows?
Please make sure that in /reporting/includes/class.pdf.inc has

case "ar_EG" :     $fontname "aealarabiya";     break;

Re: Arabic font in PDF not showing in windows server

rafat wrote:

@barbarian,
It helps if you include a screen shot of the report ..if you can.
Since its working with Linux but not Windows.. are you migrating this data into Windows or entering it directly in Windows?
Please make sure that in /reporting/includes/class.pdf.inc has

case "ar_EG" :     $fontname "aealarabiya";     break;

Hello,

So, it turns out some of the arabic are rendered in windows and some are not. I attached the image. https://i.imgur.com/TcmOtMy.jpg

Re: Arabic font in PDF not showing in windows server

Hi,
Very strange indeed. How can a system be picky with rendering the same data type differently. Arabic is working OK .. The last line shows that perfectly. The only thing that comes to mind is the data above the last item is imported from another system with different character set encoding (Arabic in FA is UTF-8). The last line is definitely entered from the local system.
By the way you are using Dejavu font and not alarabiya.
Inform us if you find the reason.

Re: Arabic font in PDF not showing in windows server

Hello,

So it seems I have a misunderstanding. I will clear a bit. Maybe you can help me now.
1. The data in the database from invoice that I gave the image is broken. So it is the problem in the database. When I create a new invoice with proper input to database, the arabic font is shown. It is both in Windows and Linux. So, in FA, there is no problem anymore.

2. I have a problem in displaying arabic. Even if I change the language to arabic, FA in my windows will only become RTL but the text will be still in english. I think there is some problem in loading the language po/mo file. Can you help me? There is no problem if the server in linux. I think maybe because arabic language support in Windows but I have installed it and it still not showing the arabic text.

Re: Arabic font in PDF not showing in windows server

Hi,

It seems your .mo is in the wrong directory as I described in my post #4 above. Give it a try.. it worked for me after a long suffering. You also might need to restart wampserver in order to see the changes immediately.