Alberto Arena
Alberto Arena

Reputation: 343

Arabic script in PDF created by UFPDF

I have issues with Arabic script inside a PDF document created by UFPDF, that is an extension of FPDF that supports unicode fonts. I have correctly converted Arial font to the format waited by UFPDF, and I have no issue with Unicode special characters in other languages (e.g. French, Spanish, German, etc.)

The single characters of Arabic script are not shown from right to left, but from left to right and it splits as single chars.

E.g.: مدرسة (school) is shown like ة س ر د م

How to handle?

Thanks in advance

Upvotes: 2

Views: 6628

Answers (2)

wesamly
wesamly

Reputation: 1584

May be you need to check http://www.ar-php.org/Glyphs-example-php-arabic.html

Ar-PHP library gives the ability to use UFPDF, and fixes the separate characters using Glyphs classes (part of the library).

You need to download the library to check the pdf example, as it is not listed in the website.

Upvotes: 1

satrun77
satrun77

Reputation: 3220

Use TCPDF http://www.tcpdf.org/ instead. It can handle UTF-8 Unicode and Right-To-Left languages.

I think if I am not wrong it's based on FPDF. So any code you already have for FPDF might work with TCPDF.

Upvotes: 3

Related Questions