Browse Source

PDF.js version 1.5.372 - See mozilla/pdf.js@ac7b6756036758baf0150c4240e64ae92bfab4c3

Pdf Bot 8 years ago
parent
commit
c070071c93
6 changed files with 14 additions and 8 deletions
  1. 1 1
      bower.json
  2. 2 2
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 2 2
      build/pdf.worker.js
  5. 1 1
      package.json
  6. 6 0
      web/pdf_viewer.js

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "pdfjs-dist",
   "name": "pdfjs-dist",
-  "version": "1.5.370",
+  "version": "1.5.372",
   "main": [
   "main": [
     "build/pdf.js",
     "build/pdf.js",
     "build/pdf.worker.js"
     "build/pdf.worker.js"

+ 2 - 2
build/pdf.combined.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
   // Use strict in our context only - users might not want it
   // Use strict in our context only - users might not want it
   'use strict';
   'use strict';
 
 
-var pdfjsVersion = '1.5.370';
-var pdfjsBuild = '3a1e794';
+var pdfjsVersion = '1.5.372';
+var pdfjsBuild = 'ac7b675';
 
 
   var pdfjsFilePath =
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
     typeof document !== 'undefined' && document.currentScript ?

+ 2 - 2
build/pdf.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
   // Use strict in our context only - users might not want it
   // Use strict in our context only - users might not want it
   'use strict';
   'use strict';
 
 
-var pdfjsVersion = '1.5.370';
-var pdfjsBuild = '3a1e794';
+var pdfjsVersion = '1.5.372';
+var pdfjsBuild = 'ac7b675';
 
 
   var pdfjsFilePath =
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
     typeof document !== 'undefined' && document.currentScript ?

+ 2 - 2
build/pdf.worker.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
   // Use strict in our context only - users might not want it
   // Use strict in our context only - users might not want it
   'use strict';
   'use strict';
 
 
-var pdfjsVersion = '1.5.370';
-var pdfjsBuild = '3a1e794';
+var pdfjsVersion = '1.5.372';
+var pdfjsBuild = 'ac7b675';
 
 
   var pdfjsFilePath =
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
     typeof document !== 'undefined' && document.currentScript ?

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "pdfjs-dist",
   "name": "pdfjs-dist",
-  "version": "1.5.370",
+  "version": "1.5.372",
   "main": "build/pdf.js",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [
   "keywords": [

+ 6 - 0
web/pdf_viewer.js

@@ -3519,8 +3519,14 @@ var PDFViewer = (function pdfViewer() {
      * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).
      * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).
      */
      */
     set pagesRotation(rotation) {
     set pagesRotation(rotation) {
+      if (!(typeof rotation === 'number' && rotation % 90 === 0)) {
+        throw new Error('Invalid pages rotation angle.');
+      }
       this._pagesRotation = rotation;
       this._pagesRotation = rotation;
 
 
+      if (!this.pdfDocument) {
+        return;
+      }
       for (var i = 0, l = this._pages.length; i < l; i++) {
       for (var i = 0, l = this._pages.length; i < l; i++) {
         var pageView = this._pages[i];
         var pageView = this._pages[i];
         pageView.update(pageView.scale, rotation);
         pageView.update(pageView.scale, rotation);