Jump to content


  • Posts

  • Joined

  • Last visited

bimbee's Achievements


Newbie (1/14)



  1. Well, I did not get the same message as you did when I left only DejaVuSans, FreeSans, etc. in the tcpdf/font folder. However generated PDF could not display Vietnamese characters so I had to include helvetica, times, courier, etc. Everything is running fine for me. So if you copy just helvetica, I think the problem can be solved without the modification you made. (Why I copied only selected fonts? Because the CJK fonts eat up so much valuable space and lengthen ftp transfer time.)
  2. Thank rigorchik for the line number correction. I should have included the original code so it would be easier for newbies. A bit lazy when new year came ) By the way, I had to modify the column width of the product table since it is not enough to fit my description. The magic is line #452: $w = array(90, 15, 25, 10, 25, 25); I increased the column width from 90 to 92 and everything worked as expected for me. You may want to increase more but I am afraid it may ruin the order structure since items are placed manually. I wish if we could have a kind of layout like GridBagLayout in Java to automate calculation of sizes & positions.
  3. Just wanna share my experience with TCPDF after I found out FPDF does not support Unicode in my language (Vietnamese): 1. Download TCPDF from TCPDF at Sourceforge 2. Unzip TCPDF into Tools folder, at the same place with FPDF 3. Modify the following files: + config\config.inc.php: add 01 line define('_PS_TCPDF_PATH_', _PS_TOOL_DIR_.'tcpdf/'); + classes\PDF.php: - Line 15: include_once(_PS_TCPDF_PATH_.'tcpdf.php'); - Line 17: class PDF extends TCPDF - Line 51: parent::__construct($orientation, $unit, $format, true, 'UTF-8'); - Line 162 + 297: $pdf->getAliasNbPages(); - Line 498: $this->MultiCell($w[++$i], 5, Tools::iconv('utf-8', self::encoding(), $product['product_name']).' - '.self::l('Customized'), 'B', 'L'); - Line 520: $this->MultiCell($w[++$i], 5, Tools::iconv('utf-8', self::encoding(), $product['product_name']), 'B', 'L'); - Line 708: return $font ? $font : 'freesans'; + class\Tools.php: Go to line 784 to modify static public function iconv(...) static public function iconv($from, $to, $string) { //$converted = htmlentities($string, ENT_NOQUOTES, $from); //$converted = html_entity_decode($converted, ENT_NOQUOTES, $to); //return $converted; return $string; } Everything works well except you need to modify PDF.php manually to change PDF font. However I don't do it frequently, so either FreeSans or DejaVuSans is enough. Remember to include the bold version of the font, too.
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More