Bug#726254: [phantomjs] PDF content is scaled by 1.5277777777777777

2015-11-25 Thread Franz Schrober
reopen 726254 =
thanks

Just tested with 2.0.0+dfsg-1 and the problem is back again. Maybe happened 
during the move to external qt5 or upgrade to qt5



Bug#726254: [phantomjs] PDF content is scaled by 1.5277777777777777

2013-10-19 Thread Franz Schrober
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



Bug#726254: [phantomjs] PDF content is scaled by 1.5277777777777777

2013-10-13 Thread Franz Schrober
Package: phantomjs
Version: 1.9.0-1
Severity: normal

It seem the content rendered as PDF is scaled in a weird way. The page size 
itself stays in the way it was specified in the code but the content is too 
large (so a 10px * 10px size cannot contain a 10px * 10px element but only a 
6px * 6px element). This causes extra pages and missing parts on the pdf pages.

See also
https://groups.google.com/forum/#!topic/phantomjs/YQIyxLWhmr0
https://github.com/ariya/phantomjs/issues/10659


Testcase can be found at https://github.com/ariya/phantomjs/issues/11590


--- System information. ---
Architecture: amd64
Kernel:   Linux 3.10-3-amd64

Debian Release: jessie/sid
500 unstablewww.deb-multimedia.org 
500 unstableftp.de.debian.org 
1 experimentalftp.de.debian.org 

--- Package information. ---
Depends(Version) | Installed
-+-==
libc6  (= 2.14) | 
libfontconfig1(= 2.9.0) | 
libfreetype6  (= 2.3.5) | 
libgcc1 (= 1:4.1.1) | 
libjpeg8 (= 8c) | 
libpng12-0 (= 1.2.13-4) | 
libstdc++6  (= 4.6) | 
zlib1g  (= 1:1.1.4) | 


Package's Recommends field is empty.

Package's Suggests field is empty.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org