Generating PDFs in Persian with PHP v4.3

  • Thread starter Thread starter Omid
  • Start date Start date
  • Tags Tags
    Php
AI Thread Summary
Generating PDF files in Persian using PHP can be challenging due to issues with Unicode support. PDFLIB does not support Unicode, resulting in nonsensical characters when Persian text is used. UFPDF can display characters correctly, but it presents two main issues: Persian characters appear separated instead of connected, and the text order is left to right instead of the required right to left. There is a need for alternative classes that support UTF-8 to address these problems. Checking documentation is essential for finding solutions, and resources like the PHP manual can provide guidance on handling fonts and encoding.
Omid
Messages
181
Reaction score
0
I need to generate PDF files in Persian. My codes are in PHP and the server is runnig ver 4.3. The PDFLIB appearently doesn't support UNICODE. When I write something in Persian it shows only some nonsence charachters on screen. I also downloaded UFPDF, after using that class the charachters were shown correctly but still I have 2 problems:
1. In persian in contrast to english the charachters are sticked togheter but the PDF, shows them seprated.
2. The order in the PDF is left to right while it must become right to left.

Do you know any other classes which support UTF-8?
Or any advice to solve the 2 problems?
Thanks
 
Computer science news on Phys.org
Always check the documenation. Do a search on the page for UTF-8

http://php.mirrors.ilisys.com.au/manual/en/function.pdf-findfont.php
 
Last edited by a moderator:
I did, but not as well as you :D
You know, all the php guys in Iran (www.Iranphp.net[/URL]) are killing themselves to solve the problem then I didn't think taking a look at the documatation would be useful.
Anyway, I'm going to check it now.
Thank you.
 
Last edited by a moderator:
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
I came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Back
Top