HelloI have been trying to generate a pdf using TCPDF and displaying Arabic RTL. For the most part this class does everything I need it to do. I have even extended it to support additional functionality as needed. However, with Arabic it displays fine other than the formation of some letters in words.
the second letter from the right doesn't have a little hook on it's right side. That's because it is correctly in it's initial form (since the first letter on the right isn't supposed to connect to the next letter)
again the second letter from the right doesn't have a hook on the right side, the vowel (circle) is placed directly over the letter, and the second letter connects to the third letter (the tooth with the dot underneath). The third letter has its vowel directly over it (the line above), connects to the previous letter, and connects to the next letter. The fourth letter (the tooth with two dots underneath) has its vowel directly above, connects to the previous letter, and connects the next letter.
I am using DejaVuSans, but I have also tried a number of other fonts such as Traditional Arabic, Times, Courier, A_Nefel_Sereke, etc. When creating the PDF from a word processing application on Windows - it will properly display the characters.
The PDFs linked here shows different documents and the first report that you are using TCPDF 2.x, so please update to the latest version.
Your test case is a good thing but what is the expected output? could you please link an image or pdf showing the correct output for your test case?
The other 2 links are still good. Now, the problem with the arabic text is the connecting letters and vowelled text in the second word. The first word looks perfect, however, in the second word the little 0 should be above the 2nd character, and the 2nd character should connect to the 3rd character.
You can see in the word-generated.pdf that the second word only has 2 spaces, after the first character and before the last character. The rest of the characters in this example should all be connected like they are in the word-generated.pdf.
Notice in the first example that in the word on the right, the 4th character is in the wrong form. In the second example the 4th character is properly displayed as a straight vertical line. I fixed this by changing 1617 to 'NSM'.
In the devjavu pdf we can see that the vowel markers (sukuun's ie. the circles) all appear to be shifted to the right. In vowelled arabic, the vowel markers (circles and lines above the letters) should be directly above the letter, or slightly to the left of the letter it is paired with-- but not to the right. In the furat pdf it is still slightly shifted, but since the font is slanted it looks ok, however - you could still shift the vowels a little to the left and both fonts would look good. Is this possible?
The second issue that still shows up is the forms. Not all the characters are having this problem, only certain ones. And it appears that vowelled arabic is causing the problem, since it does not show up in the standard arabic. Additionally, the problem appears to be characters displayed in medial form when they should be initial or final. So perhaps the logic in utf8Bidi() is incorrectly making medial forms in certain cases when vowelled arabic is used. Some examples:
The middle character is in the medial form, it should not be. The little tail on the right should not be there. (in the dejavu and furat pdfs you can find this one on the fourth line of both the vowelled and standard arabic sentences).
The last character is in the medial form, it should not be. The little tail on the left should not be there. (in the dejavu and furat pdfs you can find this one on the third line of both the vowelled and standard arabic sentences).
Perhaps you need to skip the vowels when you are checking the previous and next letter's type? I am not sure the exact rules for this, but it appears that we are very close to full vowelled arabic support.
It seems the process is recognizing punctuation (specifically the Arabic question mark) as a letter. The last letter in عمَّان should appear as an isolated form (the previous non-vowel character is a non-connector, and the next non-vowel character is an Arabic question mark). Right now it is appearing as an initial form, correctly interpreting the previous non-connector, but mis-interpreting the Arabic question mark.
I was trying to use tcpdf for arabic words it works great but i faced 2
problems i wish you could help with
1- when i use the dejavusans font all word comes out great except with the
works like "دلائل" it is output without ء and also if i typed "أحمد " it also
comes out without ء
and when i use almohanad font the words with vowel marks and all words before
it disappear but the words like دلائل comes out good and also if there is
aspace it comes out as a rectange shape so i have to trim words to remove the
white space
so can you tell me how to fix any one of this problems so i just have one
fixed font use
2- the second question is when i arabic words with svg it doesn't work so is
there any condition missing i must use so the svg works with arabic as the
arabic words comes out as ?????? ???
ProcessMaker does not include in its installer international Unicode (UTF-8) fonts for languages such Hebrew, Arabic, Japanese, Chinese, etc. The reason for not including these fonts in the installer is because it would increase the size of the ProcessMaker installer by more than 22MB. Normally this does not represent an issue, except when creating output documents in PDF format.
If using TCPDF in ProcessMaker 3.4.6 and later, the /thirdparty/tcpdf folder was removed and the TCPDF class is always loaded. Then, follow the next steps to include arialuni.ttf in your ProcessMaker instance:
As of ProcessMaker 3.5.3, to add the arialuni.ttf, you can use the ProcessMaker command documents-add-font as it is described for Output Documents in Custom fonts in Output Documents.
Automate your Workflow with Business Process Management
Software licensed under the GNU Affero General Public License version 3
Privacy Statement
Copyright 2000-2024 ProcessMaker Inc. All rights reserved.
And this issue is not in my website, it is in version 1.6.1. I have a portable Apache server in my pc (XAMPP). I do tests on it. If the interface is English, Arabic texts in PDF appears as question marks. But if the interface is in Arabic, PDF files are fine.
I opened a ticket about it in bug tracker " -6252" and still waiting for their reply. But I was in a haste before since I thought there is no work around over it. But still I would want a solution for this to be able to prent invoices easily.
This is an encoding issue since I knew PrestaShop long time ago. It has to be fixed by the Presta team. For regular text being displayed in ?????, well that's weird because that does not happen with versions of 1.6.0.x
If it is really troubling you, you are not left with an option except buying tuk66 PDF component, even though it needs some elements tweaking and repositioning in Arabic invoice templates but it is cleanly encoded.
Another slim chance I would think of might be the encoding you used for your database maybe? I do not know if tuk66 would agree on that but still, even if regular text encoding was fixed you will still have the currency code displayed in squares ريال -> [] and so on.
Yes, I knew tuk66 by his signature. I saw his site. But right now I am a startup so I am trying to cut costs until I get real benefit from this project. I am still working on the website. Next is online payment and Aramex account.
I think I need to troubleshoot the free delivery. The order is only SR 10. I don't know how it keeps happening. It keeps setting the delivery costs to 0 although I set it to SR 20. Maybe i will need to re-create the Carrier.
For Arabic text becoming ???? I think it is a bug in their software since it was working fine on 1.6.0.14 and still if the interface is in Arabic as for ريال symbol, your finding looks promising. I think I will look into using Google fonts with tcpdf, It will take time since I need to figure it out but I think it is as simple as saving the font in "tools\tcpdf\fonts" and changing the font for Arabic in the array of
Thank you for the modules, I have purchased them. I needed them and great tip regarding the tax. As for PayTabs, yes I found them and I fixed their module and it worked and I tried to get to their support to give them the fix but they ignored me and they took 2 whole months to to look at my application while I was following with them almost weekly. They had main bank account change and they postponed approving new applications for that whole period. Then after that they gave me requirements to do. But I was not active on my site (concentrating on other things) so another month wasted, Just since 1 week I am back working on my site again and I will reply to them to activate my account later.
Well I need to use them since they are the cheapest. Everyone else they want to take a percentage and ridiculously huge monthly subscription. Not good for a start up and someone working on his spare time.
Glad you are keeping up. Yeah for PayTabs, I have fixed a redirection problem not what you said. In addition, i'm not that far into testing it yet. I have not purchased the Aramex module yet too. I need more time. I have spent almost 4 months setting up Active directory, Exchange server, Security etc. It is a lot of work!
For the billing info, I don't think you need them at all? Why filling? Or do you mean filling them from the website to the paytabs bill? If that's what you meant then yes it fills it correctly in my case.
I mean, you setup an infrastructure once and let it live for the next 5 years instead of struggling each couple of months with upgrades. I had guys trying to hack the server's RDP by brute force. I had others trying to DDos other servers through mine by using DNS Amplification attack. If your website's server lay a victim for such attacks? It would be hard to diagnose and you would start to see real weird problems such as the database failing and then restarting, PrestaShop sign in authentication request blacks out on customers etc.
3a8082e126