News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

PDF Invoice - strange characters

Started by TheHostDogs, March 09, 2012, 19:54:44 PM

Previous topic - Next topic

jordanken22

Quote from: tzaris on September 23, 2014, 21:47:50 PM
i tried a lot of times with the changes but i was still getting the question marks ??
i solved it by doing the most easy step , delete the invoices in the safe path and
i finally get to see greek characters.
Joomla 2.5.25
VM 2.6.6

Good for you.  I've been having this issue for a long time now and tried getting a solution for it awhile back but failed.  Tried following every fix in this thread including deleting the invoices (though I was a bit hesitant at first but decided to since i had no other options left) but still not seeing any results.  Do you guys have any other links to help me out on this? Much appreciate any help.

rage76

I have tried everything in this thread. after changing invoice font frmo VM backend to UTF-8, it now shows a "square box" instead of the earlier "?"

font changed to "dejavusans"

where am I wrong?

Joomla 2.5.22
VM: 2.6

Garyk01

Quote from: TheHostDogs on March 18, 2012, 19:39:46 PM
Thanks guys for you replies..
I achieved to resolve my problem following ondrejspilka instructions..
I will write the steps that I followed in a more clear way so that everyone can do the changes..

1. Download tcpdf from this link http://sourceforge.net/projects/tcpdf/
2. Take the fonts files included in the Fonts folder of the downloaded file and I copy them to the /libraries/tcpdf/fonts
3. Open /libraries/joomla/document/pdf/fonts.php and find the line where $pdf->SetFont is written (about line 221)
4. Replace the line with something like that $pdf->SetFont('freesans', '', 6, '', 'false');
5. 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';

Everything is OK now...

Sofoklis
Hi!
To Russian and Ukrainian languages picked fonts:
Open file \libraries\joomla\document\pdf\pdf.php
find and change to
var $_header_font = 'dejavusans';
var $_footer_font = 'dejavusans';

$pdf->SetFont('dejavusanscondensed', '', 8, '', 'false');

Joomla 3.4.1 + VM 3.0.6.4

Milbo

Actually I wonder why this hack is still necessary. There is an option in vendor pdf tab for the font, which affects also the header and footer font


$vmFont=$this->vendor->vendor_letter_font;
$this->SetFont($vmFont, '', $this->vendor->vendor_letter_font_size, '', 'false');                 
$this->setHeaderFont(Array($vmFont, '', $this->vendor->vendor_letter_header_font_size ));
$this->setFooterFont(Array($vmFont, '', $this->vendor->vendor_letter_footer_font_size ));


So maybe you hunt ghosts?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Garyk01

Help me please!
In which file or in which tabs "Configuration" I should write this code?

Milbo

You dont need to write any code. Open your shop config (not vm config) and edit the invoice settings there.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Garyk01

 Okay! For invoices - select the font: Virtuemart->Shop->tab Invoices/Emails -> Default Font = Free Mono (UTF-8 Unicode)

But only this hack (written above) helps when you export the item description in pdf. 
May be you have other variant for export in pdf?

rage76

Again, I am on Joomla 2.5.28 & VM 2.6 and I am clueless what I am doing wrong !!
Tried everything. Seems there is no solution to this? :(

Milbo

What you do wrong is to read an old thread

"March 09, 2012" , this means that almost anything here is outdated. The problem is solved in vm2.6 and vm3. It is very likely that you have another problem.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rage76

any suggestions on what I can try to set this right?

nick-gr

Quote from: Milbo on March 30, 2015, 02:47:52 AM
Actually I wonder why this hack is still necessary. There is an option in vendor pdf tab for the font, which affects also the header and footer font


$vmFont=$this->vendor->vendor_letter_font;
$this->SetFont($vmFont, '', $this->vendor->vendor_letter_font_size, '', 'false');                 
$this->setHeaderFont(Array($vmFont, '', $this->vendor->vendor_letter_header_font_size ));
$this->setFooterFont(Array($vmFont, '', $this->vendor->vendor_letter_footer_font_size ));


So maybe you hunt ghosts?
Hello, if I open shop settings->Invoice tab->appearance->default fonts there is no fonts, only Select an Option. Any idea how can I add fonts?

Milbo

When you updated all the time, you may did not get the fonts. download the last tcpdf installer http://dev.virtuemart.net/projects/tcpdf/files
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

WilfredP

Hi all, does any one get solution for this?

I'm using Joomla 3x and VM3, I tried:
1. Change pdf.php setfont
2. Change default font via backend
3. Clear safe path invoice

But traditional chinese character not showing up still. Hope to get solution. Thanks!

ttanidis


It works Great for me too.
Greek Characters
Joomla 3.9.16
VM 3.6.10 10211


Thanks a lot