html2pdf and local (latvian) language characters

950 Views Asked by At

I am using Html2PDf to convert html to pdf.

But I am not able to achieve that it shows local (latvian) language letters. It shows ? instead.

I do understand that I should somehow add appropriate fonts, but I do not know where to get those fonts (which one support latvinan language) and how to add them into html2pdf.

Html2Pdf is based on tcpdf and currently there is font folder. I think that is seems trivial question, but I was searching via google, but have not found answer that works for me.

    require_once('inc/html2pdf/html2pdf.class.php');
    $html2pdf = new HTML2PDF('P','A4','en');
    //$html2pdf->pdf->setDefaultFont('times');                         
    // HEADER
    $pdf_output .='<page style="font-size: 11px; >';
    $pdf_output .= '<img src="images/raka_pdf_logo.png" alt="logo"/><br><br><br><br>';
     ...
1

There are 1 best solutions below

0
On

You may find the right font-family in html2pdf>tcpdf>fonts enter image description here