summaryrefslogtreecommitdiffstats
path: root/printer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'printer.cpp')
-rw-r--r--printer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/printer.cpp b/printer.cpp
index 5d340055e..e2b88c07e 100644
--- a/printer.cpp
+++ b/printer.cpp
@@ -30,7 +30,7 @@ void Printer::render()
webView->page()->setViewportSize(size);
- int Pages = ceil((float)webView->page()->mainFrame()->contentsSize().rheight() / A4_300DPI_HIGHT);
+ int Pages = ceil(getTotalWork() / 2.0);
for (int i = 0; i < Pages; i++) {
webView->page()->mainFrame()->render(&painter, QWebFrame::ContentsLayer);
webView->page()->mainFrame()->scroll(0, A4_300DPI_HIGHT);