I want to print invoice with UTF8 characters.
Everything is working (database and other applications) but scriptcase can not generate PDF with UTF8 characters.
How can I handle that?
Thanks for your answers
I want to print invoice with UTF8 characters.
Everything is working (database and other applications) but scriptcase can not generate PDF with UTF8 characters.
How can I handle that?
Thanks for your answers
Re: UTF8 Characters on PDF
Sir did you try with the latest version 5.2.009 ?
Re: UTF8 Characters on PDF
This issue remains still in Scriptcase 6.00.0002.
(I am aware I am bumping an old thread here, but I didn’t find any recent threads and the issue seems unresolved.)
Re: UTF8 Characters on PDF
Further investigation shows that fpdf (used by SC to create pdfs) doesn’t support UTF-8. See http://www.fpdf.org/ in the FAQ-section.
My solution was to convert my database from utf-8 to latin1 (ISO-8859-1) and change the character set of my SC project to ISO-8859-1 too (Project -> Properties -> Locales -> HTML charset).
Re: UTF8 Characters on PDF
Thank you from other forum readers for following up with a solution.
Re: UTF8 Characters on PDF
This way u can handle it
$mensaje = utf8_decode(’ CONDICIONES GENERALES DE CONTRATO
DE PRESTACI?N DE SERVICIOS JUR?DICOS PROFESIONALES EN MEDICINA LEGAL’);
$this->Pdf->MultiCell(170,4,$mensaje,0,‘T’,‘0’,false);
Re: UTF8 Characters on PDF
I found a solution this way:
Place the following into the onRecord event:
{field1} = utf8_decode({field1});
{field2} = utf8_decode({field2});
...
works fine in SC 6.