tagsĀ 726254 + patch thanks The fixes were just released in the upstream bugĀ 11590. Please add them to the package. The extracted patches are attached
From 0fd71586389344f6baa373fc692ecc027e6ed2af Mon Sep 17 00:00:00 2001 From: Sven Eckelmann <s...@narfation.org> Date: Sat, 19 Oct 2013 12:49:38 +0200 Subject: [PATCH 3/4] Don't scale the unit px to 1/2.54 pixel in phantomjs pdf settings
--- src/webpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index c76a4b8..649ed58 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -1039,8 +1039,8 @@ qreal stringToPointSize(const QString &string) { "mm", 72 / 25.4 }, { "cm", 72 / 2.54 }, { "in", 72 }, - { "px", 72.0 / PHANTOMJS_PDF_DPI / 2.54 }, - { "", 72.0 / PHANTOMJS_PDF_DPI / 2.54 } + { "px", 72.0 / PHANTOMJS_PDF_DPI }, + { "", 72.0 / PHANTOMJS_PDF_DPI } }; for (uint i = 0; i < sizeof(units) / sizeof(units[0]); ++i) { if (string.endsWith(units[i].unit)) { -- 1.8.4.rc3
From d66f2d748caf0fdea4ffbcfd7602dac971c50ecd Mon Sep 17 00:00:00 2001 From: Sven Eckelmann <s...@narfation.org> Date: Sat, 19 Oct 2013 12:54:41 +0200 Subject: [PATCH 4/4] Disable page shrinking for pdf printing to create an accurate output --- src/qt/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp b/src/qt/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp index a1b8f84..a1dcb57 100644 --- a/src/qt/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp +++ b/src/qt/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp @@ -35,13 +35,13 @@ namespace WebCore { // print in IE and Camino. This lets them use fewer sheets than they // would otherwise, which is presumably why other browsers do this. // Wide pages will be scaled down more than this. -const float printingMinimumShrinkFactor = 1.25f; +const float printingMinimumShrinkFactor = 1; // This number determines how small we are willing to reduce the page content // in order to accommodate the widest line. If the page would have to be // reduced smaller to make the widest line fit, we just clip instead (this // behavior matches MacIE and Mozilla, at least) -const float printingMaximumShrinkFactor = 2; +const float printingMaximumShrinkFactor = 1; PrintContext::PrintContext(Frame* frame) : m_frame(frame) -- 1.8.4.rc3