Generating PDFs in Persian with PHP v4.3

  • Thread starter Thread starter Omid
  • Start date Start date
  • Tags Tags
    Php
Click For 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 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
3
Views
4K
Replies
29
Views
5K
Replies
35
Views
10K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 3 ·
Replies
3
Views
4K
  • Sticky
  • · Replies 2 ·
Replies
2
Views
503K