0

I am using Magento version 1.9.2.2. By default, it supports Rupee symbol and Tamil font in both frontend and admin panel. But, When i have printed the order invoice, it appears as boxes. Which (tamil) font supports for Rupee symbol as well as Tamil words in generated invoice PDF in magento.

1 Answer 1

2

After a long struggle I found answer for this.

I got the solution by overriding Core file in local. (ie., copy Abstract.php file from both:

Mage\Sales\Model\Order\Pdf\Items\Abstract.php 
Mage\Sales\Model\Order\Pdf\Abstract.php

Create the same structure in local folder (ie., like this):

\app\code\local\Mage\Sales\Model\Order\Pdf\Items\Abstract.php 
\app\code\local\Mage\Sales\Model\Order\Pdf\Abstract.php

You will find the functions like

  • _setFontRegular
  • _setFontBold,
  • _setFontItalic.

You can set font in:

$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir(). /lib/LinLibertineFont/**yourfontname.ttf**);

For rupee font change font: include this in _setFontBold function.(ie., DejaVuSans.ttf font supports rupee symbol)

For tamil fonts change/set font: include font in

_setFontRegular,_setFontItalic function

Now Both tamil font and rupee symbol will appear in pdfs generating in Magento ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.