Skip to content

Commit

Permalink
Fix JBIG2Globals extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrant committed Mar 13, 2017
1 parent 2236097 commit 4653eb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
decode: function NativeImageStreamDecoder_decode(image) {
var jbigImageRequest = function() {
var globals = undefined;
if (isDict(image.params)) {
var globalsStream = image.params.get('JBIG2Globals');

var xref = image.dict.xref;
var decodeParms = xref.fetchIfRef(image.dict.get('DecodeParms'));

if (isDict(decodeParms)) {
var globalsStream = decodeParms.get('JBIG2Globals');
if (isStream(globalsStream)) {
globals = globalsStream.getBytes();
}
Expand Down

0 comments on commit 4653eb9

Please sign in to comment.