如何在 Magento 的 pdf 中正确显示 `₹`。?
How can I display `₹` properly in pdf in Magento.?
Indian Rupee symbol(₹)
未显示在 magento
的发票 pdf 中。
在system->manage currency->symbols I save currency symbol
as ₹
.
然后 pdf 看起来:
我在系统->管理货币->符号中将符号更改为₹
然后 pdf 看起来像这样:
如何在 Magento
的 pdf
(发票、订单等)中正确显示 ₹
?
你能检查你的 local.xml 文件吗 app/etc 那里有什么字符集,如果没有然后尝试添加字符集
<charset>utf8</charset>
您需要为包含印度卢比符号的 pdf 使用字体
r4ven 和 rajatsaurastri 的回答帮助我找到了解决方案。非常感谢你们..
但是我 post 使它运行良好的答案..
1.Download支持印度卢比符号的字体。我下载 dejavu-sans
字体。
2.place lib
目录中的字体。
3.open app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php 和 app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php
并替换
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf');
和
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/dejavu-sans/DejaVuSans.ttf');
(在 _setFontRegular()
、_setFontBold()
、_setFontItalic()
两个文件中起作用。)
此 link 提供了有关更改字体的更多信息。
此解决方案适用于 Magento2.1。
我们需要扩展 Magento\Sales\Model\Order\Pdf\Invoice this.We 不能直接覆盖 AbstractPdf.php。
我为 this.You 创建了一个模块,可以从 here 下载。它工作正常。
Indian Rupee symbol(₹)
未显示在 magento
的发票 pdf 中。
在system->manage currency->symbols I save currency symbol
as ₹
.
然后 pdf 看起来:
我在系统->管理货币->符号中将符号更改为₹
然后 pdf 看起来像这样:
如何在 Magento
的 pdf
(发票、订单等)中正确显示 ₹
?
你能检查你的 local.xml 文件吗 app/etc 那里有什么字符集,如果没有然后尝试添加字符集
<charset>utf8</charset>
您需要为包含印度卢比符号的 pdf 使用字体
r4ven 和 rajatsaurastri 的回答帮助我找到了解决方案。非常感谢你们..
但是我 post 使它运行良好的答案..
1.Download支持印度卢比符号的字体。我下载 dejavu-sans
字体。
2.place lib
目录中的字体。
3.open app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php 和 app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php
并替换
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf');
和
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/dejavu-sans/DejaVuSans.ttf');
(在 _setFontRegular()
、_setFontBold()
、_setFontItalic()
两个文件中起作用。)
此 link 提供了有关更改字体的更多信息。
此解决方案适用于 Magento2.1。
我们需要扩展 Magento\Sales\Model\Order\Pdf\Invoice this.We 不能直接覆盖 AbstractPdf.php。
我为 this.You 创建了一个模块,可以从 here 下载。它工作正常。