diff --git a/bower.json b/bower.json index 60aca1b62..c6ec98b77 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.492", + "version": "1.0.494", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index d38c25e54..b13578928 100644 --- a/build/pdf.combined.js +++ b/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 () { diff --git a/build/pdf.js b/build/pdf.js index b3d288910..eca287c1c 100644 --- a/build/pdf.js +++ b/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(); diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 6715e998a..27836999b 100644 --- a/build/pdf.worker.js +++ b/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 () { diff --git a/package.json b/package.json index 1e2c5f372..53cc7caaf 100644 --- a/package.json +++ b/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",