25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
|
https://github.com/wkhtmltopdf/wkhtmltopdf/commit/af95531eabb212ae16a9fb689bb25a767eb580bc
|
||
|
|
||
|
From af95531eabb212ae16a9fb689bb25a767eb580bc Mon Sep 17 00:00:00 2001
|
||
|
From: Ashish Kulkarni <kulkarni.ashish@gmail.com>
|
||
|
Date: Tue, 20 Dec 2016 17:53:46 +0530
|
||
|
Subject: [PATCH] fix build without patched Qt
|
||
|
|
||
|
This was broken since 96b03ae078b36122c48ec0ce9b164a24627c5312.
|
||
|
|
||
|
--- src/lib/multipageloader.cc
|
||
|
+++ src/lib/multipageloader.cc
|
||
|
@@ -213,10 +213,11 @@ ResourceObject::ResourceObject(MultiPageLoaderPrivate & mpl, const QUrl & u, con
|
||
|
}
|
||
|
|
||
|
webPage.setNetworkAccessManager(&networkAccessManager);
|
||
|
-
|
||
|
+#ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
|
||
|
double devicePixelRatio = multiPageLoader.dpi / 96.; // The used version of WebKit always renders at 96 DPI when no zoom is applied. It does not fully support a device pixel ratio != 1 natively.
|
||
|
webPage.mainFrame()->setZoomFactor(devicePixelRatio * settings.zoomFactor); // Zoom in the page to achieve a higher DPI.
|
||
|
webPage.setDevicePixelRatio(devicePixelRatio); // Fix CSS media queries (does not affect anything else).
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
/*!
|