使用dompdf的pdf上的INR货币符号 [英] INR currency symbol on pdf using dompdf

查看:144
本文介绍了使用dompdf的pdf上的INR货币符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用dompdf创建pdf。当我将₹ 传递给pdf时,它将转换为

I am using dompdf to create a pdf. When I pass ₹ to pdf it converts into ?

如何使用dompdf在pdf中显示印度货币符号?

How I can show indian currency symbol in pdf using dompdf?

推荐答案

PDF核心字体(Helvetica,《泰晤士报》 dompdf中的Roman,Courier)仅支持Windows ANSI中包含的字符。此外,尽管dompdf 0.5.x可以显示其他字符,但设置起来仍然需要很多工作。

The core PDF fonts (Helvetica, Times Roman, Courier) in dompdf only support characters that are included in Windows ANSI. Additionally, though dompdf 0.5.x can display other characters it requires much work to set up.

使用dompdf 0.6.0,只要您有完整的Unicode字符支持,就可以启用。加载了涵盖您的字符集的字体。 dompdf 0.6.0(当前为Beta)包含DejaVu字体,该字体确实支持₹。显示该字符只需要以下内容:

With dompdf 0.6.0 full Unicode character support is enabled so long as you have loaded a font that covers your character set. dompdf 0.6.0 (currently in beta) includes the DejaVu fonts, which do support ₹. Displaying that character requires only something like the following:

<span style="font-family: DejaVu Sans; sans-serif;">&#8377;</span>

有关使用Unicode支持配置dompdf的更多详细信息,请参见 Unicode方法在dompdf Wiki上。

For more details on configuring dompdf with Unicode support see the Unicode How-to on the dompdf wiki.

这篇关于使用dompdf的pdf上的INR货币符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆