浏览代码

PDF.js version 1.1.326

Pdf Bot 10 年之前
父节点
当前提交
4b4be2490f
共有 5 个文件被更改,包括 44 次插入12 次删除
  1. 1 1
      bower.json
  2. 20 4
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 20 4
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

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

+ 20 - 4
build/pdf.combined.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.324';
-PDFJS.build = 'c42613b';
+PDFJS.version = '1.1.326';
+PDFJS.build = '8623421';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -11354,10 +11354,11 @@ var Annotation = (function AnnotationClosure() {
     var data = this.data = {};
 
     data.subtype = dict.get('Subtype').name;
-    var rect = dict.get('Rect') || [0, 0, 0, 0];
-    data.rect = Util.normalizeRect(rect);
     data.annotationFlags = dict.get('F');
 
+    this.setRectangle(dict.get('Rect'));
+    data.rect = this.rectangle;
+
     this.setColor(dict.get('C'));
     data.color = this.color;
 
@@ -11370,6 +11371,21 @@ var Annotation = (function AnnotationClosure() {
   }
 
   Annotation.prototype = {
+    /**
+     * Set the rectangle.
+     *
+     * @public
+     * @memberof Annotation
+     * @param {Array} rectangle - The rectangle array with exactly four entries
+     */
+    setRectangle: function Annotation_setRectangle(rectangle) {
+      if (isArray(rectangle) && rectangle.length === 4) {
+        this.rectangle = Util.normalizeRect(rectangle);
+      } else {
+        this.rectangle = [0, 0, 0, 0];
+      }
+    },
+
     /**
      * Set the color and take care of color space conversion.
      *

+ 2 - 2
build/pdf.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.324';
-PDFJS.build = 'c42613b';
+PDFJS.version = '1.1.326';
+PDFJS.build = '8623421';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it

+ 20 - 4
build/pdf.worker.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.324';
-PDFJS.build = 'c42613b';
+PDFJS.version = '1.1.326';
+PDFJS.build = '8623421';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -4953,10 +4953,11 @@ var Annotation = (function AnnotationClosure() {
     var data = this.data = {};
 
     data.subtype = dict.get('Subtype').name;
-    var rect = dict.get('Rect') || [0, 0, 0, 0];
-    data.rect = Util.normalizeRect(rect);
     data.annotationFlags = dict.get('F');
 
+    this.setRectangle(dict.get('Rect'));
+    data.rect = this.rectangle;
+
     this.setColor(dict.get('C'));
     data.color = this.color;
 
@@ -4969,6 +4970,21 @@ var Annotation = (function AnnotationClosure() {
   }
 
   Annotation.prototype = {
+    /**
+     * Set the rectangle.
+     *
+     * @public
+     * @memberof Annotation
+     * @param {Array} rectangle - The rectangle array with exactly four entries
+     */
+    setRectangle: function Annotation_setRectangle(rectangle) {
+      if (isArray(rectangle) && rectangle.length === 4) {
+        this.rectangle = Util.normalizeRect(rectangle);
+      } else {
+        this.rectangle = [0, 0, 0, 0];
+      }
+    },
+
     /**
      * Set the color and take care of color space conversion.
      *

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.1.324",
+  "version": "1.1.326",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [
     "Mozilla",