Extra page with html nobr that does not fit on a single page
PHP class for PDF
Brought to you by:
nicolaasuni
If you have a large html table with the "nobr" tag which cannot render entirely on one page then currently page break is triggered and you end up with a blank page.
Fixed it so that if you are already at the top of a page and it does not fit then don't add another page.
Diff attached.
HTML nobr patch
The proposed path break the multicolumn mode.
the correct change should be:
FROM:
if ( (!$undo) AND (($this->start_transaction_page == ($this->numpages - 1)) OR ($this->y < $this->start_transaction_y))) {
TO:
if ( (!$undo) AND ($this->start_transaction_y > $this->tMargin) AND (($this->start_transaction_page == ($this->numpages - 1)) OR ($this->y < $this->start_transaction_y))) {
Try this solution and let me know if it works in your case.
I will fix this on the next release.
Mmmm, maybe a much better alternative is:
if ((!$undo) AND ($this->y < $this->start_transaction_y)) {
When ($this->y < $this->start_transaction_y) we are on new page or on a new column and the total object height is less than the available vertical space. Obviously, this works only with pages of the same size and the same margins (the general case).