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

Pr fixes #177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Pr fixes #177

wants to merge 5 commits into from

Conversation

savioret
Copy link

Added some very needed doc on some functions.
Fix for #175 which partially reverts 00db904
Found a scenario where can come to infinite loop and fixed it.

@savioret
Copy link
Author

savioret commented Jul 2, 2023

I have updated the pull request to keep Cpdf clean without any justification modification in addText.
I had to change Cezpdf, removing the justification checks as some cases were not covered (for example when a line break character was in the text).

image

This code reproduces the problem:

$pdf = new CezPDF('a4');
$pdf->selectFont('Helvetica');


$pdf->ezColumnsStart(['num' => 2, 'gap'=>20]);
$options = ['justification' => 'full'];

// Testing break lines should be considered as last lines
$text1 = "\nLorem ipsum dolor sit amet, vitae et sit posuere metus urna et vitae dolor consectetur adipiscing tristique nec odio id euismod."
."\nCurabitur euismod ex volutpat bibendum eleifend."
."\nDonec pretium pretium nibh."
."\nAt consectetur turpis porta et.\n";
$pdf->ezText($text1, 0, $options);
$pdf->ezColumnsStop();
$pdf->ezStream();

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

Successfully merging this pull request may close these issues.

1 participant