I'm using html2pdf and passing $this->renderpartial('view',array(..),true) to the $content.
Here's the code:
$content = $this->renderpartial('view',array(..),true);
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf->WriteHTML($content);
$html2pdf->Output('/var/www/myapp/images/example.pdf','F');
The view declares an otf font.. which I have succesfully imported into tcpdf using an online-converter.
But the output of the pdf has some arabic, but some of the letters and weirdly english letters into squares. What's worse is that even though in my html there's the directive of RTL .. some parts of the document are still in LTR.
I have the output html with me if you need to see it.. without the html2pdf bit.. straight out from the $this->renderpartial. If you need it I'll paste it or attach as an image.