1

Hi I am a newbie with html2pdf. I need to create an invoice pdf which would also contain special slovakien characters like ľščťžýáíéĆĚŘUÍ, however after spending yesterday evening trying to solve this, I am still not able to create PDF with such symbols.

This is my test code:

$content = "ľščťžýáíéĆĚءUÍ";
require_once('html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en',false, 'UTF-8');
$html2pdf->WriteHTML($content);
$html2pdf->Output('exemple.pdf');

Output: ¾šè•žýáíéÆÌØ¡UÍ

Can you pls. tell me what I need to add or change, so the pdf can show all the characters correctly ?
Your help would be much appreciated :-)

2

Hi, I am Also new in html2pdf (and Also Slovak).
I had same problem.
Thy this:
(I used version html2pdf_v4.03_php5)
- just chance in for example in exemple00.php in row 25 default font form Arial to DejaVuSans,
so row 25 will be.
$html2pdf->setDefaultFont('DejaVuSans');

This solved my problem since I I do not cere about font tipe. I just wanted to display Slovak symbols.