Skip to content

Commit

Permalink
Add extra exit condition to main loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Mar 23, 2024
1 parent cb263e2 commit 84d9d3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ public function addTextCol(
$region = $this->page->getRegion();
$line_posy = ($posy + $region['RY']);

$region_max_lines = 1;

// loop through the regions to fit all available text
while (true) {
while ($region_max_lines > 0) {
if ($this->page->isYOutRegion($line_posy, $fontheight)) {
$this->page->getNextRegion();
$this->setPageContext();
Expand Down

0 comments on commit 84d9d3c

Please sign in to comment.