Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPrinter and HTML page break inside table
Qt 6.11 is out! See what's new in the release blog

QPrinter and HTML page break inside table

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Resurr3ctionR Offline
    Resurr3ctionR Offline
    Resurr3ction
    wrote on last edited by Resurr3ction
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved