Menu

#36 Extra page with html nobr that does not fit on a single page

closed
nobody
None
5
2012-10-09
2010-10-06
Thomas Good
No

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.

Discussion

  • Thomas Good

    Thomas Good - 2010-10-06

    HTML nobr patch

     
  • Nicola Asuni

    Nicola Asuni - 2010-10-07

    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.

     
  • Nicola Asuni

    Nicola Asuni - 2010-10-07

    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).

     

Log in to post a comment.

MongoDB Logo MongoDB