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. PDF Paging issues text overflow
Forum Updated to NodeBB v4.3 + New Features

PDF Paging issues text overflow

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.5k 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.
  • A Offline
    A Offline
    asweetroxxi
    wrote on last edited by
    #1

    i created a pdf with QtextDocument. I have a table in the pdf but the bottom of the page cuts the text instead of printing on a new page. is there anyway to prevent the overflow.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zarko Markovic
      wrote on last edited by
      #2

      I never used QTableWidget to print, however QWebView::print does the job fine for a HTML table that spans on multiple pages. If the overhead is not a problem you can export QTableWidget contents to a html page in a hidden QWebView in order to print/save the page to PDF.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        asweetroxxi
        wrote on last edited by
        #3

        the issue is the table is being populated from sql datebase would this be an issue. And i just started programming so please be discriptive me coding is still weak.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          Zarko Markovic
          wrote on last edited by
          #4

          [quote author="asweetroxxi" date="1353505884"]the issue is the table is being populated from sql datebase would this be an issue. And i just started programming so please be discriptive me coding is still weak.
          [/quote]

          The fact that the text is not properly cut between pages in the resulting PDF file is not related to where you get the data from, being it a sql database, file or you simply add rows to the QTableWidget programmatically. Again I never used QTableWidget to print the data as a table in PDF file, but I used QWebView for that without the issue you have. If you want to to do it with QWebView you will need to read the docs on it and have some knowledge in HTML to be able to prepare the html page properly.

          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