diff --git a/web/firefox_print_service.js b/web/firefox_print_service.js index 7829bad66..d4b1e16cd 100644 --- a/web/firefox_print_service.js +++ b/web/firefox_print_service.js @@ -34,7 +34,7 @@ function composePage( canvas.height = Math.floor(size.height * PRINT_UNITS); const canvasWrapper = document.createElement("div"); - canvasWrapper.setAttribute("class", "printedPage"); + canvasWrapper.className = "printedPage"; canvasWrapper.appendChild(canvas); printContainer.appendChild(canvasWrapper); diff --git a/web/pdf_print_service.js b/web/pdf_print_service.js index f8fc14e15..a74ca3374 100644 --- a/web/pdf_print_service.js +++ b/web/pdf_print_service.js @@ -163,10 +163,8 @@ PDFPrintService.prototype = { this._printResolution, this._optionalContentConfigPromise ) - .then(() => { - this.useRenderedPage.bind(this); - }) - .then(() => { + .then(this.useRenderedPage.bind(this)) + .then(function () { renderNextPage(resolve, reject); }, reject); }; @@ -189,7 +187,7 @@ PDFPrintService.prototype = { } const wrapper = document.createElement("div"); - wrapper.setAttribute("class", "printedPage"); + wrapper.className = "printedPage"; wrapper.appendChild(img); this.printContainer.appendChild(wrapper); diff --git a/web/ui_utils.js b/web/ui_utils.js index ce2a26dfc..3d7634bb0 100644 --- a/web/ui_utils.js +++ b/web/ui_utils.js @@ -1002,7 +1002,7 @@ function getXfaHtmlForPrinting(printContainer, pdfDocument) { const scale = Math.round(CSS_UNITS * 100) / 100; for (const xfaPage of xfaHtml.children) { const page = document.createElement("div"); - page.setAttribute("class", "xfaPrintedPage"); + page.className = "xfaPrintedPage"; printContainer.appendChild(page); const { width, height } = xfaPage.attributes.style; diff --git a/web/viewer.css b/web/viewer.css index 2f4244999..ee03ee920 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -1839,8 +1839,8 @@ html[dir="rtl"] #documentPropertiesOverlay .row > * { position: relative; } - .printedPage canvas, - .printedPage img { + #printContainer > .printedPage canvas, + #printContainer > .printedPage img { /* The intrinsic canvas / image size will make sure that we fit the page. */ max-width: 100%; max-height: 100%;