i have a problem with TCPDF library ,i'm generating pdf file usind TCPDF library in arabic language,the file direction is rtl so i used $pdf->setRTL(true); , and every thing is fine in the first page ,put in the second page or third the direction reseted to ltr!!!
this is apice of my code:
$pdf->AddPage();
$l = Array();
$l['a_meta_charset'] = 'UTF-8';
$l['a_meta_dir'] = 'rtl';
$l['a_meta_language'] = '';
$l['w_page'] = '';
$pdf->setLanguageArray($l);
$pdf->SetFont('almohanad', '', 16);
$pdf->setRTL(true); // cehck here if ar or en
$html = '
<style>
html{
direction:rtl;
}
</style>
<div style="direction:rtl">
<br/><br/>
<img src="' . $image . '" />
<br/>
<span style="color:green">'.$date.'</span>
<h5 style="color:gray">'.$title.'</h5>
<div style="color:blue;direction:rtl">'.$content.'</div>
</div>
';
$pdf->writeHTML($html, true, false, false, true, "");
$pdf->setRTL(true);
$pdf->lastPage();
#excute the file
$pdf->Output($fileName, 'I');
So my question is: how can I make all pages in tcpdf have the same direction as rtl ???