Skip to content

Commit

Permalink
Merge pull request #4861 from timvandermeij/xobject
Browse files Browse the repository at this point in the history
Fixes unhandled XObject subtype PS error
  • Loading branch information
yurydelendik committed May 29, 2014
2 parents 7e6cdc7 + e128bdc commit 844bc64
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
assert(isName(type),
'XObject should have a Name subtype');

if ('Form' == type.name) {
if (type.name === 'Form') {
stateManager.save();
return self.buildFormXObject(resources, xobj, null,
operatorList,
Expand All @@ -644,11 +644,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
stateManager.restore();
next(resolve, reject);
}, reject);
} else if ('Image' == type.name) {
} else if (type.name === 'Image') {
self.buildPaintImageXObject(resources, xobj, false,
operatorList, name, imageCache);
args = [];
continue;
} else if (type.name === 'PS') {
// PostScript XObjects are unused when viewing documents.
// See section 4.7.1 of Adobe's PDF reference.
info('Ignored XObject subtype PS');
continue;
} else {
error('Unhandled XObject subtype ' + type.name);
}
Expand Down

0 comments on commit 844bc64

Please sign in to comment.