Browse Source

PDF.js version 1.6.377 - See mozilla/pdf.js@47f03b619f0c6fec506235227a9a2df457d3ef93

Pdf Bot 8 years ago
parent
commit
94b3ed2d31
7 changed files with 44 additions and 36 deletions
  1. 1 1
      bower.json
  2. 20 16
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 0 0
      build/pdf.min.js
  5. 20 16
      build/pdf.worker.js
  6. 0 0
      build/pdf.worker.min.js
  7. 1 1
      package.json

+ 1 - 1
bower.json

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

+ 20 - 16
build/pdf.combined.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.374';
- var pdfjsBuild = '407dee3';
+ var pdfjsVersion = '1.6.377';
+ var pdfjsBuild = '47f03b6';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {
@@ -55113,11 +55113,12 @@
      getPageProp: function Page_getPageProp(key) {
       return this.pageDict.get(key);
      },
-     getInheritedPageProp: function Page_getInheritedPageProp(key) {
+     getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) {
       var dict = this.pageDict, valueArray = null, loopCount = 0;
       var MAX_LOOP_COUNT = 100;
+      getArray = getArray || false;
       while (dict) {
-       var value = dict.get(key);
+       var value = getArray ? dict.getArray(key) : dict.get(key);
        if (value) {
         if (!valueArray) {
          valueArray = [];
@@ -55145,11 +55146,18 @@
       return shadow(this, 'resources', this.getInheritedPageProp('Resources'));
      },
      get mediaBox() {
-      var obj = this.getInheritedPageProp('MediaBox');
-      if (!isArray(obj) || obj.length !== 4) {
-       obj = LETTER_SIZE_MEDIABOX;
+      var mediaBox = this.getInheritedPageProp('MediaBox', true);
+      if (!isArray(mediaBox) || mediaBox.length !== 4) {
+       return shadow(this, 'mediaBox', LETTER_SIZE_MEDIABOX);
       }
-      return shadow(this, 'mediaBox', obj);
+      return shadow(this, 'mediaBox', mediaBox);
+     },
+     get cropBox() {
+      var cropBox = this.getInheritedPageProp('CropBox', true);
+      if (!isArray(cropBox) || cropBox.length !== 4) {
+       return shadow(this, 'cropBox', this.mediaBox);
+      }
+      return shadow(this, 'cropBox', cropBox);
      },
      get userUnit() {
       var obj = this.getPageProp('UserUnit');
@@ -55159,16 +55167,12 @@
       return shadow(this, 'userUnit', obj);
      },
      get view() {
-      var mediaBox = this.mediaBox;
-      var cropBox = this.getInheritedPageProp('CropBox');
-      if (!isArray(cropBox) || cropBox.length !== 4) {
-       return shadow(this, 'view', mediaBox);
-      }
-      cropBox = Util.intersect(cropBox, mediaBox);
-      if (!cropBox) {
+      var mediaBox = this.mediaBox, cropBox = this.cropBox;
+      if (mediaBox === cropBox) {
        return shadow(this, 'view', mediaBox);
       }
-      return shadow(this, 'view', cropBox);
+      var intersection = Util.intersect(cropBox, mediaBox);
+      return shadow(this, 'view', intersection || mediaBox);
      },
      get rotate() {
       var rotate = this.getInheritedPageProp('Rotate') || 0;

+ 2 - 2
build/pdf.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.374';
- var pdfjsBuild = '407dee3';
+ var pdfjsVersion = '1.6.377';
+ var pdfjsBuild = '47f03b6';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {

File diff suppressed because it is too large
+ 0 - 0
build/pdf.min.js


+ 20 - 16
build/pdf.worker.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.374';
- var pdfjsBuild = '407dee3';
+ var pdfjsVersion = '1.6.377';
+ var pdfjsBuild = '47f03b6';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {
@@ -48496,11 +48496,12 @@
      getPageProp: function Page_getPageProp(key) {
       return this.pageDict.get(key);
      },
-     getInheritedPageProp: function Page_getInheritedPageProp(key) {
+     getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) {
       var dict = this.pageDict, valueArray = null, loopCount = 0;
       var MAX_LOOP_COUNT = 100;
+      getArray = getArray || false;
       while (dict) {
-       var value = dict.get(key);
+       var value = getArray ? dict.getArray(key) : dict.get(key);
        if (value) {
         if (!valueArray) {
          valueArray = [];
@@ -48528,11 +48529,18 @@
       return shadow(this, 'resources', this.getInheritedPageProp('Resources'));
      },
      get mediaBox() {
-      var obj = this.getInheritedPageProp('MediaBox');
-      if (!isArray(obj) || obj.length !== 4) {
-       obj = LETTER_SIZE_MEDIABOX;
+      var mediaBox = this.getInheritedPageProp('MediaBox', true);
+      if (!isArray(mediaBox) || mediaBox.length !== 4) {
+       return shadow(this, 'mediaBox', LETTER_SIZE_MEDIABOX);
       }
-      return shadow(this, 'mediaBox', obj);
+      return shadow(this, 'mediaBox', mediaBox);
+     },
+     get cropBox() {
+      var cropBox = this.getInheritedPageProp('CropBox', true);
+      if (!isArray(cropBox) || cropBox.length !== 4) {
+       return shadow(this, 'cropBox', this.mediaBox);
+      }
+      return shadow(this, 'cropBox', cropBox);
      },
      get userUnit() {
       var obj = this.getPageProp('UserUnit');
@@ -48542,16 +48550,12 @@
       return shadow(this, 'userUnit', obj);
      },
      get view() {
-      var mediaBox = this.mediaBox;
-      var cropBox = this.getInheritedPageProp('CropBox');
-      if (!isArray(cropBox) || cropBox.length !== 4) {
-       return shadow(this, 'view', mediaBox);
-      }
-      cropBox = Util.intersect(cropBox, mediaBox);
-      if (!cropBox) {
+      var mediaBox = this.mediaBox, cropBox = this.cropBox;
+      if (mediaBox === cropBox) {
        return shadow(this, 'view', mediaBox);
       }
-      return shadow(this, 'view', cropBox);
+      var intersection = Util.intersect(cropBox, mediaBox);
+      return shadow(this, 'view', intersection || mediaBox);
      },
      get rotate() {
       var rotate = this.getInheritedPageProp('Rotate') || 0;

File diff suppressed because it is too large
+ 0 - 0
build/pdf.worker.min.js


+ 1 - 1
package.json

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

Some files were not shown because too many files changed in this diff