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?
Forum Updated to NodeBB v4.3 + New Features

How to print text in multiple pages?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 955 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.
  • W Offline
    W Offline
    whitesong
    wrote on 27 Mar 2014, 23:02 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
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 28 Mar 2014, 00:13 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 29 Mar 2014, 15:30 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

        2/3

        28 Mar 2014, 00:13

        • Login

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