You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I will report this in the new library, because I cannot open issues on the deprecated old one)
When mixing some RTL characters with some other UTF8 characters in the same HTML node, like when mixing Chinese characters and Arabic characters (嫀 ط), then TCPDF screams a notice and the PDF is not built.
This happens on latest 6.2 version of TCPDF (and on elder ones like 5.9), using PHP 5.6.25
Showcase:
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
spl_autoload_register();
error_reporting(E_ALL);
$pdf = new TCPDF('P', 'mm', 'A4');
// This one works
//$string = "<span>嫀</span> <span>ط</span>";
//
// This one fails
$string = "嫀 ط";
echo($string);
var_dump($string);
$pdf->AddPage();
$pdf->writeHTML($string);
$pdfContent = $pdf->Output('doc.pdf', 'S');
// Screams ( ! ) Notice: Undefined offset: 23232 in C:\wamp\www\TCPDF-master\include\tcpdf_fonts.php on line 2119
var_dump($pdfContent);
(I will report this in the new library, because I cannot open issues on the deprecated old one)
When mixing some RTL characters with some other UTF8 characters in the same HTML node, like when mixing Chinese characters and Arabic characters (嫀 ط), then TCPDF screams a notice and the PDF is not built.
This happens on latest 6.2 version of TCPDF (and on elder ones like 5.9), using PHP 5.6.25
Showcase:
Result:
嫀 ط
C:\wamp\www\TCPDF-master\test-8576.php:16:string '嫀 ط' (length=16)
( ! ) Notice: Undefined offset: 23232 in C:\wamp\www\TCPDF-master\include\tcpdf_fonts.php on line 2119
And the PDF is not generated.
The text was updated successfully, but these errors were encountered: