Avlad Posted October 8, 2008 Share Posted October 8, 2008 Hello!I am trying to make Prestashop 1.0.0.8 to create invoices in language with diacritic symbols. In my case I need CP1257 code table - Baltic languages.After several days of the forum research and trying several different solution I still can not find anything, that works for the 1.0.0.8. May be anyone is more lucky, that me ? Please help...What I am checking:First, I am generating correct font for my charset on http://fpdf.fruit-lab.de/ It need to be done for normal and bold font. I have created arial.php, arial.z, arialb.php, arialb.z files and copy it to thetools/fpdf/fontSecond, set in the back office - CP1257 and font - arial.Third - trying to figure out, what need to be changed in the pdf.php to make this fonts work. I have checked the following published solutions:http://www.prestashop.com/forums/viewthread/3480/__/_lang____pdfSeems, that this method work only for RC5. For me words in the .pdf truncated on the first diacritic symbol.http://www.prestashop.com/forums/viewthread/3161/old_bug_report_forum/generating_pdf_invoicesSame result - does not work.http://www.prestashop.com/forums/viewthread/830/P60/Same result - looks, that this solution work only in RC5 and does not work in 1.0.0.8PrestaTeam is aware of this problem: 02 June 2008 12:02 PM Philippe Sang writes: Yes we are aware about this problem and working on for RC4. However, as the problem is still present in the released version, the are not so many chances, that it can be fixed in near future.The only remaining suggestion, that I was not tested - change pdf library from fpdf to some another, that support utf-8 encoding. To my knowledge, at least the following libraries exist:http://acko.net/node/56 - UFPDF: Unicode/UTF-8 extension for FPDFhttp://tcpdf.sf.net/ - Open Source PHP class for generating PDF documentsHowever, I did not have enough skills to change this library. May be someone can help ? Link to comment Share on other sites More sharing options...
nati Posted October 26, 2008 Share Posted October 26, 2008 hidid u managed to solve the problem? Link to comment Share on other sites More sharing options...
Avlad Posted October 26, 2008 Author Share Posted October 26, 2008 Yes, sure.As PrestaTeam can not resolve this issue, the only remaining solution - do it yourself. I have installed ufpdf, have generated utf-8 fonts, fix updf for this application and rewrite pdf.php to work with ufpdf and new fonts. Detailed description here:http://www.prestashop.com/forums/viewthread/3480/P15/_lang____pdfNow I have all invoices printed in utf-8. It is especially useful, when you need to use two languages with incompatible encodings, for example CP1251 and CP1257. Link to comment Share on other sites More sharing options...
Recommended Posts