Browse Source

PDF.js version 1.6.304 - See mozilla/pdf.js@b4100ba65103142c626c0961e7f9af476a1c5f6e

Pdf Bot 8 years ago
parent
commit
34794edce1
5 changed files with 30 additions and 24 deletions
  1. 1 1
      bower.json
  2. 13 10
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 13 10
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

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

+ 13 - 10
build/pdf.combined.js

@@ -24,8 +24,8 @@
 }(this, function (exports) {
   // Use strict in our context only - users might not want it
   'use strict';
-  var pdfjsVersion = '1.6.302';
-  var pdfjsBuild = '1d82521';
+  var pdfjsVersion = '1.6.304';
+  var pdfjsBuild = 'b4100ba';
   var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
   var pdfjsLibs = {};
   (function pdfjsWrapper() {
@@ -6848,9 +6848,9 @@
               } else if (value >= 251 && value <= 254) {
                 return -((value - 251) * 256) - dict[pos++] - 108;
               } else {
-                error('255 is not a valid DICT command');
+                warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
+                return NaN;
               }
-              return -1;
             }
             function parseFloatOperand() {
               var str = '';
@@ -7489,19 +7489,22 @@
             if (!(key in this.keyToNameMap)) {
               return false;
             }
+            var valueLength = value.length;
             // ignore empty values
-            if (value.length === 0) {
+            if (valueLength === 0) {
               return true;
             }
+            // Ignore invalid values (fixes bug1068432.pdf and bug1308536.pdf).
+            for (var i = 0; i < valueLength; i++) {
+              if (isNaN(value[i])) {
+                warn('Invalid CFFDict value: "' + value + '" for key "' + key + '".');
+                return true;
+              }
+            }
             var type = this.types[key];
             // remove the array wrapping these types of values
             if (type === 'num' || type === 'sid' || type === 'offset') {
               value = value[0];
-              // Ignore invalid values (fixes bug 1068432).
-              if (isNaN(value)) {
-                warn('Invalid CFFDict value: ' + value + ', for key: ' + key + '.');
-                return true;
-              }
             }
             this.values[key] = value;
             return true;

+ 2 - 2
build/pdf.js

@@ -24,8 +24,8 @@
 }(this, function (exports) {
   // Use strict in our context only - users might not want it
   'use strict';
-  var pdfjsVersion = '1.6.302';
-  var pdfjsBuild = '1d82521';
+  var pdfjsVersion = '1.6.304';
+  var pdfjsBuild = 'b4100ba';
   var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
   var pdfjsLibs = {};
   (function pdfjsWrapper() {

+ 13 - 10
build/pdf.worker.js

@@ -24,8 +24,8 @@
 }(this, function (exports) {
   // Use strict in our context only - users might not want it
   'use strict';
-  var pdfjsVersion = '1.6.302';
-  var pdfjsBuild = '1d82521';
+  var pdfjsVersion = '1.6.304';
+  var pdfjsBuild = 'b4100ba';
   var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
   var pdfjsLibs = {};
   (function pdfjsWrapper() {
@@ -6848,9 +6848,9 @@
               } else if (value >= 251 && value <= 254) {
                 return -((value - 251) * 256) - dict[pos++] - 108;
               } else {
-                error('255 is not a valid DICT command');
+                warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
+                return NaN;
               }
-              return -1;
             }
             function parseFloatOperand() {
               var str = '';
@@ -7489,19 +7489,22 @@
             if (!(key in this.keyToNameMap)) {
               return false;
             }
+            var valueLength = value.length;
             // ignore empty values
-            if (value.length === 0) {
+            if (valueLength === 0) {
               return true;
             }
+            // Ignore invalid values (fixes bug1068432.pdf and bug1308536.pdf).
+            for (var i = 0; i < valueLength; i++) {
+              if (isNaN(value[i])) {
+                warn('Invalid CFFDict value: "' + value + '" for key "' + key + '".');
+                return true;
+              }
+            }
             var type = this.types[key];
             // remove the array wrapping these types of values
             if (type === 'num' || type === 'sid' || type === 'offset') {
               value = value[0];
-              // Ignore invalid values (fixes bug 1068432).
-              if (isNaN(value)) {
-                warn('Invalid CFFDict value: ' + value + ', for key: ' + key + '.');
-                return true;
-              }
             }
             this.values[key] = value;
             return true;

+ 1 - 1
package.json

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