summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorMichael Brüning <michael.bruning@qt.io>2018-02-26 14:38:13 +0100
committerKai Koehne <kai.koehne@qt.io>2018-03-06 07:26:35 +0000
commit66a6518422bb32a85a481088a213a790ffd48785 (patch)
tree920945700398fa97a6f8e734137971ca16c1d910 /src/webenginewidgets
parent0d9ba4179245d89e163494ea0a3652e790ec08a0 (diff)
Explicitly use custom margins for printing to pdf
3cec2ccb0ffdd41a41ab55d4c1ba88d4866e71d1 introduced a regression because it was assumed that the page was only printed to pdf when a filename was given. This is not the case when the pdf data is handed to the callback, though. Correct this by explicitly stating when margins should be used. Task-number: QTBUG-66654 Change-Id: I663f578ff5d01c77cc62e6f3756a17f78168a9aa Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index ec35ea6ce..497083f4d 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -2237,7 +2237,9 @@ void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &re
}
d->currentPrinter = printer;
#endif // ENABLE_PRINTING
- quint64 requestId = d->adapter->printToPDFCallbackResult(printer->pageLayout(), printer->colorMode() == QPrinter::Color);
+ quint64 requestId = d->adapter->printToPDFCallbackResult(printer->pageLayout(),
+ printer->colorMode() == QPrinter::Color,
+ false);
d->m_callbacks.registerCallback(requestId, resultCallback);
#else // if defined(ENABLE_PDF)
Q_UNUSED(printer);