PDF Paging issues text overflow



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



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



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


Log in to reply
 

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