Fetch decodeParams if it's a |Ref| in JBIG2Decode streams
This commit is contained in:
parent
8206894d24
commit
7c044bc30d
@ -1033,7 +1033,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
|
|||||||
|
|
||||||
var jbig2Image = new Jbig2Image();
|
var jbig2Image = new Jbig2Image();
|
||||||
|
|
||||||
var chunks = [], decodeParams = this.dict.get('DecodeParms');
|
var chunks = [], xref = this.dict.xref;
|
||||||
|
var decodeParams = xref.fetchIfRef(this.dict.get('DecodeParms'));
|
||||||
|
|
||||||
// According to the PDF specification, DecodeParms can be either
|
// According to the PDF specification, DecodeParms can be either
|
||||||
// a dictionary, or an array whose elements are dictionaries.
|
// a dictionary, or an array whose elements are dictionaries.
|
||||||
@ -1042,7 +1043,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
|
|||||||
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
|
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
|
||||||
'not supported.');
|
'not supported.');
|
||||||
}
|
}
|
||||||
decodeParams = decodeParams[0];
|
decodeParams = xref.fetchIfRef(decodeParams[0]);
|
||||||
}
|
}
|
||||||
if (decodeParams && decodeParams.has('JBIG2Globals')) {
|
if (decodeParams && decodeParams.has('JBIG2Globals')) {
|
||||||
var globalsStream = decodeParams.get('JBIG2Globals');
|
var globalsStream = decodeParams.get('JBIG2Globals');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user