]> _ Git - fluidbook-html5.git/commitdiff
try #7839 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 19 Dec 2025 18:04:27 +0000 (19:04 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 19 Dec 2025 18:04:27 +0000 (19:04 +0100)
js/libs/fluidbook/fluidbook.js

index d49f1ff301f9e16c9b4382aa7ae720a6038501ac..91eff64c6d4c038acee6aa19aeb1100a2d63837c 100644 (file)
@@ -767,7 +767,7 @@ Fluidbook.prototype = {
     },
 
     getPhysicalPageNumberOfSide: function (side, strict) { // Side should be 'left' or 'right'
-        if (this.elasticslide!==undefined  && this.elasticslide.isActive()) {
+        if (this.elasticslide !== undefined && this.elasticslide.isActive()) {
             return this.currentPage;
         }
         if (undefined === strict) {
@@ -880,8 +880,15 @@ Fluidbook.prototype = {
         var pdf;
         var pdfName;
 
-        if (this.settings.pages != this.contentlock.getMaxPage()) {
-            pdf = this.service.getBaseURL(true) + 'e/' + this.settings.id + '-' + this.settings.cid + '/1-' + this.contentlock.getMaxPage();
+        let service = 'e';
+        if (print) {
+            service = 'ep';
+        }
+
+        if (this.support.webview && print) {
+            pdf = this.service.getBaseURL(true) + service + '/' + this.settings.id + '-' + this.settings.cid + '/1-' + this.settings.pages;
+        } else if (this.settings.pages != this.contentlock.getMaxPage()) {
+            pdf = this.service.getBaseURL(true) + service + '/' + this.settings.id + '-' + this.settings.cid + '/1-' + this.contentlock.getMaxPage();
         } else if (this.settings.pdfName.substr(0, 4) === 'http') {
             pdf = this.settings.pdfName;
         } else {