Commit 27d9d84e authored by Laurent Montel's avatar Laurent Montel 😁

Make it print to pdf

parent 0d23c4b9
......@@ -56,11 +56,16 @@ void PrintWebEngineViewJob::start()
Q_EMIT failed();
deleteLater();
} else {
mTemporaryFile.setAutoRemove(false);
if (mPageLayout.isValid()) {
mTemporaryFile.setAutoRemove(false);
#if QT_VERSION >= 0x050700
//Print to pdf
//mEngineView->page()->printToPdf(invoke(this, &PrintWebEngineViewJob::slotHandlePdfPrinted), printer.pageLayout());
//Print to pdf
mEngineView->page()->printToPdf(invoke(this, &PrintWebEngineViewJob::slotHandlePdfPrinted), mPageLayout);
#endif
} else {
Q_EMIT failed();
deleteLater();
}
}
} else {
Q_EMIT failed();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment