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

tserts

Thanks again, tonight for some reason my net speeds are very slow and it's a pain to perform more tests, I did two test orders and I got NO pdf attached to mails and, to add insult to injury, my backend generated pdfs from the order list are now messed up as well (the usual question marks). I will look into that tomorrow, I have to clean caches, chown some files (I edit as root sometimes for speed along many sites and some folders are sensitive to ownership) and re-run the tests, on top of all that I have upgraded vm versions since posting the first post and I can't know if something else is causing this..

I will update tomorrow after making everything is as it should..

bytelord

Try with dejavusans both in vm admin and tcpdf

joomla_folder\components\com_virtuemart\controller\invoice.php around lines 151, 152 change the font

$pdf->setHeaderFont(Array('dejavusans', '', 8 ));
$pdf->setFooterFont(Array('dejavusans', '', 10 ));

also around line 179, change also the font

$pdf->SetFont('dejavusans', '', 8, '', true);

------


libraries\joomla\document\pdf\pdf.php around lines 32 and 33

var $_header_font = 'dejavusans';
var $_footer_font = 'dejavusans';

around line 222
   $pdf->SetFont('dejavusans', '', 8, '', 'false');

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

tserts

Ok, I made all the above changes and my backend generated pdfs are once again OK, I still don't get attached pdfs Ι'm afraid during the last update some root-owned files (my bad) were not updated, I will wait for the next update which will happen after a chown -R and try again. I don't think there are other places to look into, those two files are where the problem is (one for the email attachments and one for the back end), but I will post as soon as I have a solid set of files by version.

tserts

Ok FIXED.

I had to change the "statuses to send  invoice" in configuration they were empty for some reason.

The attached pdf was as it should, perfectly readable.

Thanks a lot for your help Bytelord!!

autarh

problem after update to 2.0.22b

before update everything worked fine, after update same situation instead UTF8 characters i have "?" ... any solution ?

tserts

Same here with a new site for a client, the documents have changed, I can't even find the same fields...

Shop>invoices now has a default font selection menu but I have no available fonts to choose...


tserts

Must be here, in vmpdf.php, so if I could set it in the front end it should work..

$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 ));

tserts

OK, fixed it.

After I messed it up beyond hope, I re-installed the newest component, then aio, then updated the tables. Magically, after all that, I had a UTF-8 font on the drop down menu on the backend, which, when selected, worked as it should, both front and back end.

BaidareW

Hello,

downloaded fonts, changed pdf.php as described but my Lithuanian text in PDF is still with ?? characters when pressing in back end.

And I can't find fonts line in file \components\com_virtuemart\controller\invoice.php so maybe this is the problem ?

Using 2.0.22x version of virtuemart.


WebWorx

Did anyone get this method to work on the newer version of VM? I am having problems with the PDF invoice and Hebrew... getting question marks to come up where it should say (in Hebrew) Name, Address, Date, City, State, etc. the data for the customer - ie. the actual name, address is in there but just the labels show up as ????.... I posted my issue here... and I tried the suggestions I have found on these threads with no success.... Here is the thread with more info - http://forum.virtuemart.net/index.php?topic=120243.msg409539#msg409539

dbcig2013

#26

hi,

in my case ( japanese character) , this workaround does not work.

i correctly loaded the freesans font in joomla library, but it seems the modification of pdf.php ( /libraries/joomla/document/pdf/)   and invoice.php (components\com_virtuemart\controller\invoice.php) do not change the font in generated pdf file

if i have a look in the properties of generated invoice, the default font is not freesans as it should

nb: fonts.php does not exist. instead i have pdf.php

dbcig2013

Quote from: dbcig2013 on December 22, 2013, 14:16:12 PM

hi,

in my case ( japanese character) , this workaround does not work.

i correctly loaded the freesans font in joomla library, but it seems the modification of pdf.php ( /libraries/joomla/document/pdf/)   and invoice.php (components\com_virtuemart\controller\invoice.php) do not change the font in generated pdf file

if i have a look in the properties of generated invoice, the default font is not freesans as it should

nb: fonts.php does not exist. instead i have pdf.php

[attachment cleanup by admin]

its4yougr

It works Great for me too.
Greek Characters
Joomla 2.5.24
VM 2.6.6

The only difference is that the file is pdf.php

Thanks a lot
Κατασκευή Ιστοσελίδων Θεσσαλονίκη - http://www.its4you.gr/
WebDesign Internet Marketing - http://www.webdesign-internetmarketing.com/

tzaris

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