Code modifications didn't help much, but I solved it by simply changing settings.
In VirtueMart
Go to Shop -> Invoices tab
Then in Default font choose
Free Mono (UTF-8 Unicide)
I'm using local version of virtuemart, so settings may have slightly different names.
Virtuemart 2.0.22d/joomla 2.5.14 - invoice pdf character encoding
-
28-06-2022 - |
Question
I am using Virtuemart 2.0.22d/joomla 2.5.14. I have installed the greek language and when someone who uses the greek language make an order, the invoice pdf that is sent by email and also the pdf invoice in the backend are unreadable. Instead of characters they are full of ?. I guess it has to do with encoding. Any ideas on how to fix this? Thank you in advance
Solution
OTHER TIPS
Download tcpdf from this link http://sourceforge.net/projects/tcpdf/
Take the fonts files included in the Fonts folder of the downloaded file and I copy them to the /libraries/tcpdf/fonts
Open /libraries/joomla/document/pdf/fonts.php and find the line where
$pdf->SetFont
is written (about line 221)Replace the line with something like that
$pdf->SetFont('freesans', '', 6, '', 'false');
Find
"var $_header_font"
and"var $_footer_font"
(about lines 32 and 33) and replace the fonts there with freesans font:
var $_header_font = 'freesans';
var $_footer_font = 'freesans';