[Pkg-javascript-commits] [pdf.js] 282/414: Fix insertion of blank pages during printing due to non-matching page sizes

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit aeabd0db209a98b70c8b14226ae381e8b49c81b1
Author: Tobias Schneider <schneider at jancona.com>
Date:   Wed Feb 10 13:10:03 2016 -0800

    Fix insertion of blank pages during printing due to non-matching page sizes
---
 web/pdf_page_view.js | 2 --
 web/viewer.css       | 6 ++++++
 web/viewer.js        | 4 ----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js
index f03a135..3341989 100644
--- a/web/pdf_page_view.js
+++ b/web/pdf_page_view.js
@@ -541,8 +541,6 @@ var PDFPageView = (function PDFPageViewClosure() {
 
       var printContainer = document.getElementById('printContainer');
       var canvasWrapper = document.createElement('div');
-      canvasWrapper.style.width = viewport.width + 'pt';
-      canvasWrapper.style.height = viewport.height + 'pt';
       canvasWrapper.appendChild(canvas);
       printContainer.appendChild(canvasWrapper);
 
diff --git a/web/viewer.css b/web/viewer.css
index b782684..898c792 100644
--- a/web/viewer.css
+++ b/web/viewer.css
@@ -22,12 +22,14 @@
 
 html {
   height: 100%;
+  width: 100%;
   /* Font size is needed to make the activity bar the correct size. */
   font-size: 10px;
 }
 
 body {
   height: 100%;
+  width: 100%;
   background-color: #404040;
   background-image: url(images/texture.png);
 }
@@ -1800,11 +1802,15 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * {
   body[data-mozPrintCallback] #printContainer {
     display: block;
   }
+  #printContainer {
+    height: 100%;
+  }
   /* wrapper around (scaled) print canvas elements */
   #printContainer > div {
     position: relative;
     top: 0;
     left: 0;
+    height: 100%;
     overflow: hidden;
   }
   #printContainer canvas {
diff --git a/web/viewer.js b/web/viewer.js
index a478e11..487d4cb 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -1166,10 +1166,6 @@ var PDFViewerApplication = {
       // Firefox incorrectly reports support for the other value.
       '@supports ((size:A4) and (size:1pt 1pt)) {' +
       '@page { size: ' + pageSize.width + 'pt ' + pageSize.height + 'pt;}' +
-      // The canvas and each ancestor node must have a height of 100% to make
-      // sure that each canvas is printed on exactly one page.
-      '#printContainer {height:100%}' +
-      '#printContainer > div {width:100% !important;height:100% !important;}' +
       '}';
     body.appendChild(this.pageStyleSheet);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list