Remove stream.parameters which wasn't being set consistently. Fixes issue #2881.
This commit is contained in:
		
							parent
							
								
									bae7b54f5f
								
							
						
					
					
						commit
						c195daf85e
					
				| @ -550,7 +550,7 @@ var XRef = (function XRefClosure() { | ||||
|       if (!('streamState' in this)) { | ||||
|         // Stores state of the stream as we process it so we can resume
 | ||||
|         // from middle of stream in case of missing data error
 | ||||
|         var streamParameters = stream.parameters; | ||||
|         var streamParameters = stream.dict; | ||||
|         var byteWidths = streamParameters.get('W'); | ||||
|         var range = streamParameters.get('Index'); | ||||
|         if (!range) { | ||||
| @ -567,7 +567,7 @@ var XRef = (function XRefClosure() { | ||||
|       this.readXRefStream(stream); | ||||
|       delete this.streamState; | ||||
| 
 | ||||
|       return stream.parameters; | ||||
|       return stream.dict; | ||||
|     }, | ||||
| 
 | ||||
|     readXRefStream: function XRef_readXRefStream(stream) { | ||||
| @ -903,8 +903,8 @@ var XRef = (function XRefClosure() { | ||||
|       stream = this.fetch(new Ref(tableOffset, 0)); | ||||
|       if (!isStream(stream)) | ||||
|         error('bad ObjStm stream'); | ||||
|       var first = stream.parameters.get('First'); | ||||
|       var n = stream.parameters.get('N'); | ||||
|       var first = stream.dict.get('First'); | ||||
|       var n = stream.dict.get('N'); | ||||
|       if (!isInt(first) || !isInt(n)) { | ||||
|         error('invalid first and n parameters for ObjStm stream'); | ||||
|       } | ||||
|  | ||||
| @ -180,7 +180,7 @@ var Parser = (function ParserClosure() { | ||||
|       if (cipherTransform) | ||||
|         imageStream = cipherTransform.createStream(imageStream); | ||||
|       imageStream = this.filter(imageStream, dict, length); | ||||
|       imageStream.parameters = dict; | ||||
|       imageStream.dict = dict; | ||||
| 
 | ||||
|       this.buf2 = Cmd.get('EI'); | ||||
|       this.shift(); | ||||
| @ -216,7 +216,7 @@ var Parser = (function ParserClosure() { | ||||
|       if (cipherTransform) | ||||
|         stream = cipherTransform.createStream(stream); | ||||
|       stream = this.filter(stream, dict, length); | ||||
|       stream.parameters = dict; | ||||
|       stream.dict = dict; | ||||
|       return stream; | ||||
|     }, | ||||
|     filter: function Parser_filter(stream, dict, length) { | ||||
|  | ||||
| @ -26,7 +26,7 @@ var Stream = (function StreamClosure() { | ||||
|     this.start = start || 0; | ||||
|     this.pos = this.start; | ||||
|     this.end = (start + length) || this.bytes.length; | ||||
|     this.parameters = this.dict = dict; | ||||
|     this.dict = dict; | ||||
|   } | ||||
| 
 | ||||
|   // required methods for a stream. if a particular stream does not
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user