It's better, words Š and Ž are recognized but Č is still replaced with "?". How can I fix this?
This is how my code looks like now:
ob_start();
include(dirname(__FILE__).'/pdf.php');
$content = ob_get_clean();
require_once(dirname(__FILE__).'/pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en', true, 'UTF-8');
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf->setDefaultFont('Times');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('pdf1.pdf', 'F');
Another thing, if I use as in example:
$content = file_get_contents(dirname(__FILE__).'/pdf.php');
$content = '<page style="font-family: freeserif"><br />'.nl2br($content).'</page>';
Then php code is ignored, it's shown in PDF instead of executed code... So this is probably used just for txt?