diff --git a/pdf.js b/pdf.js index 12aa9ca4c..52fd0ffcb 100644 --- a/pdf.js +++ b/pdf.js @@ -2714,7 +2714,9 @@ var Parser = (function() { // stream objects are not allowed inside content streams or // object streams - if (this.allowStreams && IsCmd(this.buf2, 'stream')) { + if (IsCmd(this.buf2, 'stream')) { + if (!this.allowStreams) + return dict; return this.makeStream(dict, cipherTransform); } else { this.shift();