Guest Posted February 2, 2010 Share Posted February 2, 2010 I`m testing this contribution http://addons.oscommerce.com/info/5321, it`s for PDF invoices. If all will be good i`ll add it to my shop! But i came up with a problem for my language (Latvian - ē ū ī ā š ķ ļ etc.) special charters. So i have searched forum for answers, but got only questions and no good solution for it! This contribution is using FPDF as i understood it`s dose not support UTF-8, so i have made my research and find that UFPDF is the answer on my question, but the main problem is that as i`m not a programmer, but i understand how this works, can someone help me to solve this, how to replace FPDF with UPDF. Can someone give me a clue or point to right direction or best way supply with already fixed solution! Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2010 Share Posted February 3, 2010 Anyone? Quote Link to comment Share on other sites More sharing options...
multimixer Posted February 3, 2010 Share Posted February 3, 2010 I don't have this contribution installed, so I can not say much. Taking a quick look, I found in file pdfinvoice.php following line $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->customer['format_id'], $order->customer, '', '', "\n")),0,'L'); like for everything that is getting printed. I can not tell you how to solve this, but this is causing the error Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2010 Share Posted February 3, 2010 I don't have this contribution installed, so I can not say much. Taking a quick look, I found in file pdfinvoice.php following line $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->customer['format_id'], $order->customer, '', '', "\n")),0,'L'); like for everything that is getting printed. I can not tell you how to solve this, but this is causing the error i`ll try to figure out why it`s so but i have i clue! :) Quote Link to comment Share on other sites More sharing options...
multimixer Posted February 3, 2010 Share Posted February 3, 2010 Hope you will post the results here :) Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2010 Share Posted February 3, 2010 Hope you will post the results here :) if i get that i will! ;) p.s. we need to share our knowledge! :) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 4, 2010 Share Posted February 4, 2010 if i get that i will! ;) p.s. we need to share our knowledge! :) I have trying to combinate FPDF and UFPDF, but can`t get it work, maybe someone hve done it? Quote Link to comment Share on other sites More sharing options...
multimixer Posted February 4, 2010 Share Posted February 4, 2010 I have trying to combinate FPDF and UFPDF, but can`t get it work, maybe someone hve done it? Can you post exactly what you was trying to do and what the results are? Will be easier for somebody else to jump in Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Johnatan Posted March 9, 2010 Share Posted March 9, 2010 After two sleepless nights (and a ton of smoked cigarettes - just kidding) I finally came up with a solution. I had installed PDF invoice and Pslip with FPDF. I downloaded TCPDF. I copied tcpdf.php in fpdf directory and renamed it in fpdf.php. I copied all the .php files in tcpdf directory to fpdf dir. I also copied the config and the fonts directory to fpdf directory. Then I changed the pdfinvoice.php (around line 125) class PDF extends FPDF in class PDF extends TCPDF then I Setting up a Verdana font for usage with TCPDF (described in the Utils folder) [if you need help with changing the fonts, just ask]. upload it to the fonts directory. in tcpdf.php (or now renamed fpdf.php) I replaced all the source codes courier with verdana. and that's it...now I have Croatian special characters [šđč枊ĐČĆŽ] Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2010 Share Posted March 10, 2010 After two sleepless nights (and a ton of smoked cigarettes - just kidding) I finally came up with a solution. I had installed PDF invoice and Pslip with FPDF. I downloaded TCPDF. I copied tcpdf.php in fpdf directory and renamed it in fpdf.php. I copied all the .php files in tcpdf directory to fpdf dir. I also copied the config and the fonts directory to fpdf directory. Then I changed the pdfinvoice.php (around line 125) class PDF extends FPDF in class PDF extends TCPDF then I Setting up a Verdana font for usage with TCPDF (described in the Utils folder) [if you need help with changing the fonts, just ask]. upload it to the fonts directory. in tcpdf.php (or now renamed fpdf.php) I replaced all the source codes courier with verdana. and that's it...now I have Croatian special characters [šđč枊ĐČĆŽ] This is really fantastic!! Can send me thous fonts u used - Verdana? Quote Link to comment Share on other sites More sharing options...
Johnatan Posted March 15, 2010 Share Posted March 15, 2010 look in PM's Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2010 Share Posted April 18, 2010 look in PM's I have found time for testing your theory, but i have an error when i try make an PDF this is the error: TCPDF ERROR: Could not include font definition file: arial But cant find any arial in new fpdf.php Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2010 Share Posted April 18, 2010 I have found time for testing your theory, but i have an error when i try make an PDF this is the error: TCPDF ERROR: Could not include font definition file: arial But cant find any arial in new fpdf.php Stuid me! :P Got it solved, i did not have any arial fonts on my server, so i made them and then it all worked perfectly! p.s. for thous who are asking about the last command of making font - php -q makefont.php myfont.ttf myfont.ufm This is need to be executed from Telnet client such as Putty! just copy your files to the server and have fun! (This took a while for me to understand!) Cheers! abhi9 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.