From 4653eb9b4785ee840b75cd2d053bc6b13848fce5 Mon Sep 17 00:00:00 2001 From: Peter Brant Date: Mon, 13 Mar 2017 22:57:27 +0100 Subject: [PATCH] Fix JBIG2Globals extraction --- src/core/evaluator.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 9772668c92d87..00f6f6566f5c5 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -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(); }