1
123abc
4y

PAGE BREAK AFTER IS FUCKED UP. FML

ok guys, if you have any recommendation or alternative to page-break-after, please let me know. im desperately in need of a goddamn solution.

heres my problem, ive got a table, inside the table is the tbody, now i only want two rows to be displayed in each page (im doing html for pdf docs). so what ive been trying to do is adding <tr class="display:block;page-break-after: always !important"> whenever it meets the condition (rowCount%2!=0).

Ive been trying to figure this out for the last 12 fucking hours. cheesus fucking crust. ik this isnt stackoverflow but stack hasnt really been helpful as well :( FML

Comments
  • 1
    Is there any logic you can hook into as far as the html to pdf software goes?
  • 3
    It looks like page-break-after was replaced by break-after?
  • 3
    Try adding "position: relative;" to TR, let's see what happens...
  • 4
    The main reason the page break isn't working is in the display type on table rows, so setting that to `display: block` should do the trick.

    As `page-break-*` properties have been deprecated you should probably include both properties for now. And then maybe just do the whole thing in CSS like this:
    ```
    table tr {
    display: block;
    }
    table tr:nth-child(2n) {
    page-break-after: always;
    break-after: page;
    }
    ```
  • 3
    I FIXED IT!!! THANK YOU GUYS!!!
  • 0
    @N00bPancakes uhhm this is the only way i know to produce reports thru qweb in odoo
Add Comment