由 UFPDF 创建的 PDF 中的阿拉伯文字

发布于 2024-08-25 16:29:13 字数 256 浏览 4 评论 0原文

我对 UFPDF 创建的 PDF 文档中的阿拉伯文字有疑问,UFPDF 是支持 unicode 字体的 FPDF 扩展。我已将 Arial 字体正确转换为 UFPDF 等待的格式,并且对其他语言(例如法语、西班牙语、德语等)中的 Unicode 特殊字符没有任何问题。

阿拉伯文字的单个字符未从右到左显示,但从左到右它会分裂为单个字符。

例如: Μρρρ (school) 显示为 ρ ρ ρ

该如何处理?

提前致谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

羁〃客ぐ 2024-09-01 16:29:13

请改用 TCPDF http://www.tcpdf.org/。它可以处理 UTF-8 Unicode 和从右到左的语言。

我想如果我没记错的话它是基于 FPDF 的。因此,您已有的 FPDF 任何代码都可以与 TCPDF 一起使用。

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.

注定孤独终老 2024-09-01 16:29:13

可能您需要检查 http://www.ar-php.org /Glyphs-example-php-arabic.html

Ar-PHP 库提供了使用 UFPDF 的能力,并使用 Glyphs 类(库的一部分)修复了单独的字符。

您需要下载该库才能查看 pdf 示例,因为该库未在网站中列出。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文