VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: godsgracetech on October 15, 2017, 07:48:14 AM

Title: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: godsgracetech on October 15, 2017, 07:48:14 AM
Hello,
I have been watching this post for solution since two months :-), but no response from anyone. Did anyone find the solution the for this issue ? We are able to display the "₹" rupee symbol on the website and emails, but not in the Invoice that we generate from VM administrator. It is showing as "?" when we generate invoice into PDF. I tried many suggestion that i found in this forum, but no solution.

Appreciate if any body can help us to fix this issue as soon as possible.

Thanks
Title: Re: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: Studio 42 on October 15, 2017, 11:58:25 AM
You should try deja vu font.
It have more special char inside so certainly can render your "₹" symbol
Some info here https://www.fontsquirrel.com/fonts/dejavu-sans
Title: Re: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: VMTemplates.net on October 15, 2017, 16:17:52 PM
Hi,

try these solutions:
https://stackoverflow.com/questions/6721295/google-web-fonts-and-pdf-generation-from-html-with-wkhtmltopdf

@font-face with base64 can be pasted into 'CSS Styles for the Document:' field in VirtueMart -> Shop at invoice Invoice tab.

Thanks,
Jason
Title: Re: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: Studio 42 on October 15, 2017, 17:04:59 PM
VMTemplates.net, Vm can only use tcpdf to generate orders. so why a link to wkhtmltopdf ?
And tcpdf do not support webfonts as i know
Title: Re: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: godsgracetech on October 15, 2017, 18:54:56 PM
Quote from: Studio 42 on October 15, 2017, 11:58:25 AM
You should try deja vu font.
It have more special char inside so certainly can render your "₹" symbol
Some info here https://www.fontsquirrel.com/fonts/dejavu-sans

Thank you for your suggestion, how can i use this font style  in our website in our Joomla Virtuemart..?

Appreciate your help.

Thank You
Title: Re: how to display "₹" (Indian Rupee Symbol) on VM invoice PDFs
Post by: Studio 42 on October 15, 2017, 21:39:51 PM

You have to change the font in the CSS, if this is declared.
And in config too.
To have dejavu in the list add a file :
JOOMLAROOT/libraries/tcpdf/fonts/dejavusans_specs.xml
<?xml version="1.0" encoding="UTF-8"?>
<font>
  <fontname>Deja vu</fontname>
  <fonttype>Base font</fonttype>
  <filename>dejavusans</filename>
  <version>1.0</version>
  <creationDate>2012-11-28</creationDate>
  <author>The VirtueMart Development Team</author>
  <copyright>Copyright (C) 2004-2012 Virtuemart Team. All rights reserved.</copyright>
  <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
  <files>
    <file>dejavusans.php</file>
    <file>dejavusansb.php</file>
<file>dejavusansbi.php</file>
    <file>dejavusansi.php</file>
    <file>dejavusans.xml</file>
  </files>
</font>

You can get dejavusans files from official TCPDF github package https://github.com/tecnickcom/TCPDF


To convert a TTF font, you can try:
http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf
Note convert not work always