Merge pull request #5077 from Snuffleupagus/issue-5039

Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
This commit is contained in:
Yury Delendik 2014-07-25 14:34:51 -05:00
commit 1e21bac9d3
5 changed files with 24 additions and 8 deletions

View file

@ -1489,11 +1489,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();