summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/webenginewidgets/printme/printhandler.cpp1
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/examples/webenginewidgets/printme/printhandler.cpp b/examples/webenginewidgets/printme/printhandler.cpp
index d8c4fc177..b1eb037e6 100644
--- a/examples/webenginewidgets/printme/printhandler.cpp
+++ b/examples/webenginewidgets/printme/printhandler.cpp
@@ -107,6 +107,7 @@ void PrintHandler::printPreview()
return;
m_inPrintPreview = true;
QPrinter printer;
+ printer.setResolution(300);
QPrintPreviewDialog preview(&printer, m_page->view());
connect(&preview, &QPrintPreviewDialog::paintRequested,
this, &PrintHandler::printDocument);
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 57aa413b9..e08afed44 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -2526,6 +2526,10 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
+ \note This function rasterizes the result when rendering onto \a printer. Please consider raising
+ the default resolution of \a printer to at least 300 DPI or using printToPdf() to produce
+ PDF file output more effectively.
+
\since 5.8
*/
void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback)