Convert `PDFViewer` to an ES6 class
@ -977,7 +977,7 @@ let PDFViewerApplication = {
!initialParams.hash) {
return;
}
if (this.hasEqualPageSizes) {
if (pdfViewer.hasEqualPageSizes) {
this.initialDestination = initialParams.destination;
@ -1217,19 +1217,6 @@ let PDFViewerApplication = {
},
// Whether all pages of the PDF have the same width and height.
get hasEqualPageSizes() {
let firstPage = this.pdfViewer.getPageView(0);
for (let i = 1, ii = this.pagesCount; i < ii; ++i) {
let pageView = this.pdfViewer.getPageView(i);
if (pageView.width !== firstPage.width ||
pageView.height !== firstPage.height) {
return false;
return true;
afterPrint: function pdfViewSetupAfterPrint() {
if (this.printService) {
this.printService.destroy();