Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting stuck in while loop #148

Open
nilstr opened this issue Dec 9, 2020 · 2 comments
Open

Getting stuck in while loop #148

nilstr opened this issue Dec 9, 2020 · 2 comments

Comments

@nilstr
Copy link

nilstr commented Dec 9, 2020

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.

$line = $this->addText($left, $this->y, $size, $line, $right - $left, $just, 0, 0, $test);

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();
@ole1986
Copy link
Collaborator

ole1986 commented Apr 11, 2023

Thank you for your effort on the example code

ole1986 added a commit that referenced this issue Apr 12, 2023
@ole1986 ole1986 closed this as completed Apr 12, 2023
@ole1986 ole1986 reopened this Apr 20, 2023
ole1986 added a commit that referenced this issue Apr 20, 2023
ole1986 added a commit that referenced this issue Apr 20, 2023
@savioret
Copy link

This was fixed in pull request #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants