Browse Source

PDF.js version 1.0.494

Yury Delendik 11 years ago
parent
commit
491b6a66e0
5 changed files with 42 additions and 26 deletions
  1. 1 1
      bower.json
  2. 19 11
      build/pdf.combined.js
  3. 8 3
      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.0.492",
+  "version": "1.0.494",
   "keywords": [
     "Mozilla",
     "pdf",

+ 19 - 11
build/pdf.combined.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.492';
-PDFJS.build = '62e6265';
+PDFJS.version = '1.0.494';
+PDFJS.build = '1e21bac';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -4474,11 +4474,16 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
           continue;
         }
 
+        var operatorList = font.charProcOperatorList[glyph.operatorListId];
+        if (!operatorList) {
+          warn('Type3 character \"' + glyph.operatorListId +
+               '\" is not available');
+          continue;
+        }
         this.processingType3 = glyph;
         this.save();
         ctx.scale(fontSize, fontSize);
         ctx.transform.apply(ctx, fontMatrix);
-        var operatorList = font.charProcOperatorList[glyph.operatorListId];
         this.executeOperatorList(operatorList);
         this.restore();
 
@@ -23198,14 +23203,17 @@ var TranslatedFont = (function TranslatedFontClosure() {
           var glyphStream = charProcs[key];
           var operatorList = new OperatorList();
           return evaluator.getOperatorList(glyphStream, fontResources,
-            operatorList).
-            then(function () {
-              charProcOperatorList[key] = operatorList.getIR();
-
-              // Add the dependencies to the parent operator list so they are
-              // resolved before sub operator list is executed synchronously.
-              parentOperatorList.addDependencies(operatorList.dependencies);
-            });
+                                           operatorList).then(function () {
+            charProcOperatorList[key] = operatorList.getIR();
+
+            // Add the dependencies to the parent operator list so they are
+            // resolved before sub operator list is executed synchronously.
+            parentOperatorList.addDependencies(operatorList.dependencies);
+          }, function (reason) {
+            warn('Type3 font resource \"' + key + '\" is not available');
+            var operatorList = new OperatorList();
+            charProcOperatorList[key] = operatorList.getIR();
+          });
         }.bind(this, charProcKeys[i]));
       }
       this.type3Loaded = loadCharProcsPromise.then(function () {

+ 8 - 3
build/pdf.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.492';
-PDFJS.build = '62e6265';
+PDFJS.version = '1.0.494';
+PDFJS.build = '1e21bac';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -4518,11 +4518,16 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
           continue;
         }
 
+        var operatorList = font.charProcOperatorList[glyph.operatorListId];
+        if (!operatorList) {
+          warn('Type3 character \"' + glyph.operatorListId +
+               '\" is not available');
+          continue;
+        }
         this.processingType3 = glyph;
         this.save();
         ctx.scale(fontSize, fontSize);
         ctx.transform.apply(ctx, fontMatrix);
-        var operatorList = font.charProcOperatorList[glyph.operatorListId];
         this.executeOperatorList(operatorList);
         this.restore();
 

+ 13 - 10
build/pdf.worker.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.492';
-PDFJS.build = '62e6265';
+PDFJS.version = '1.0.494';
+PDFJS.build = '1e21bac';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -18344,14 +18344,17 @@ var TranslatedFont = (function TranslatedFontClosure() {
           var glyphStream = charProcs[key];
           var operatorList = new OperatorList();
           return evaluator.getOperatorList(glyphStream, fontResources,
-            operatorList).
-            then(function () {
-              charProcOperatorList[key] = operatorList.getIR();
-
-              // Add the dependencies to the parent operator list so they are
-              // resolved before sub operator list is executed synchronously.
-              parentOperatorList.addDependencies(operatorList.dependencies);
-            });
+                                           operatorList).then(function () {
+            charProcOperatorList[key] = operatorList.getIR();
+
+            // Add the dependencies to the parent operator list so they are
+            // resolved before sub operator list is executed synchronously.
+            parentOperatorList.addDependencies(operatorList.dependencies);
+          }, function (reason) {
+            warn('Type3 font resource \"' + key + '\" is not available');
+            var operatorList = new OperatorList();
+            charProcOperatorList[key] = operatorList.getIR();
+          });
         }.bind(this, charProcKeys[i]));
       }
       this.type3Loaded = loadCharProcsPromise.then(function () {

+ 1 - 1
package.json

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