You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch

22 lines
883 B

Fix build without patched Qt
This was broken since 96b03ae.
diff --git a/src/lib/multipageloader.cc b/src/lib/multipageloader.cc
index 93dece8..456a857 100644
--- a/src/lib/multipageloader.cc
+++ b/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
}
/*!