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. How to print text in multiple pages?
QtWS25 Last Chance

How to print text in multiple pages?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 944 Views
  • 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.
  • W Offline
    W Offline
    whitesong
    wrote on last edited by
    #1

    I use this code:
    @
    QPrintDialog printDialog(&printer, this);
    if (printDialog.exec()) {
    QTextDocument textDocument;
    textDocument.setHtml(html);
    textDocument.print(&printer);
    }@
    but when html is increased it doesn't make another page for rest of text, it prints all text in one page for this I must use @ newPage() @ but I don't know how implement it. please help me to solve this problem.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Printing has received a major improvement in Qt 5.3. Please try the "Qt 5.3 beta":http://blog.qt.digia.com/blog/2014/03/25/qt-5-3-beta-released/ and see if it automatically creates a new page now.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • W Offline
        W Offline
        whitesong
        wrote on last edited by
        #3

        Hi
        I did what you do but it still print all information in first page, could you show me a simple code for print text or HTML in multiple page?

        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