nBill Community nBill Home Page
21/May/2012, 11:15:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Click Here for the nBill home page, or take a tour.  
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: greek characters using html2pdf cannot be shown  (Read 2697 times)
weballdesign
Jr. Member
**
Offline Offline

Posts: 19


View Profile
« on: 05/March/2010, 10:45:46 AM »

Hi,
 I am struggling to show greek characters on pdf invoices using the html2pdf tool. I downloaded the zip file containing html2pdf from nbill site and followed the instructions.
 All latin characters are shown correctly invoices, but greek characters are not showed at all.
 From html preview of invoices greek characters are shown correctly.
 I have tried several things, editing the html2ps.config file, in various ways, installing some unicode fonts as suggested in faq from http://www.tufat.com/docs/html2ps/faq.html#fonts-greek-tonos, but with no luck
 I tried editing  nbill_to_pdf.php setting 'encoding'  to 'iso-8859-7' or 'utf-8' but no change either.

 I know it probably has to do entirely with html2ps and not nbill.
 I am posting it here in case I am missing some kind of configuration, and to hear any suggestions or ideas.

 Thanks!
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #1 on: 05/March/2010, 11:10:10 AM »

I don't really know - the only suggestion I can think of is to edit the config.inc.php file and change the default encoding there to utf-8 and change define('FONT_EMBEDDING_MODE', 'none'); to define('FONT_EMBEDDING_MODE', 'all'); (to embed the font in the PDF document). That would make your PDFs very large in file size though.
Logged
weballdesign
Jr. Member
**
Offline Offline

Posts: 19


View Profile
« Reply #2 on: 05/March/2010, 11:40:43 AM »

Code:
define('FONT_EMBEDDING_MODE', 'all');

was indeed what was needed to show greek characters!

You can't imagine how releaved I am. I have run into similar problems in the past with greek in auto created pdfs that were a nightmare to solve! When I managed to make them work, pdf file sizes were always above 400K so I think this is the only way.

A big thank you!
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #3 on: 05/March/2010, 12:18:22 PM »

 Cool
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!