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