QPrinter and HTML page break inside table



  • I am trying to print a table via QPrinter into various destinations (PDF, HTML, regular printer and print preview dialogue). I am using QString containing HTML to format the data and then print it. In many cases the page breaks inside of a row which is undesirable for me but I am simply unable to make any example that uses CSS styles to work. Some things I have tried:

    http://stackoverflow.com/questions/9288802/avoid-page-break-inside-row-of-table
    http://stackoverflow.com/questions/8712677/how-to-apply-css-page-break-to-print-a-table-with-lots-of-rows

    Virtually every suggestion in each plus dozens of one-suggestion only other links that are variations of the same (applying CSS style to various HTML table elements). It is frustrating because I know that outside of a table it works - I can break page wherever I place the correct tag with the same style. But inside a table nothing works.

    I would appreciate even a work-around if this is related to webkit bug that allegedly makes the 'page-break-inside' be ignored. Thanks.

    Using: Qt 5.4 with MinGW (32-bit) on Windows 8.1 61-bit


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.