pdf-php
pdf-php copied to clipboard
Getting stuck in while loop
There are still a problem where the code gets stuck in a never ending loop in the current version. Probably related to the text length and column width. When using the eztable function the code can get stuck in a loop. I narrowed it down to the ezText function getting run with the following parameters:
$pdf->ezText("<b>Konto</b>", 10, [ "aleft" => 55.14, "aright" => 59.477, "justification" => "left"], 0);
Which make this line never return an empty string. So the while loop continues forever. https://github.com/rospdf/pdf-php/blob/f957e49ddfa6b7891de62c48b1de965a74db6c44/src/Cezpdf.php#L1985
Can be reproduced with this code:
<?php
include 'src/Cezpdf.php';
$pdf = new Cezpdf();
$pdf->ezText("<b>Konto</b>", 10, [ "aleft" => 55.14, "aright" => 59.477, "justification" => "left"], 0);
$pdf->ezStream();
Thank you for your effort on the example code
This was fixed in pull request #177