Fix a bug with pdfminer which occurs when two or more filters are applied to a stream, even though no parameters are specified. The code would previously drop all of the streams after the first due to misapplication of the zip function.
parent
5609418351
commit
b0b8818a41
|
@ -223,8 +223,13 @@ class PDFStream(PDFObject):
|
|||
return []
|
||||
if not isinstance(filters, list):
|
||||
filters = [filters]
|
||||
if not isinstance(params, list):
|
||||
if not params:
|
||||
# Make sure the parameters list is the same as filters.
|
||||
params = [{}]*len(filters)
|
||||
elif not isinstance(params, list):
|
||||
params = [params]
|
||||
if STRICT and len(params) != len(filters):
|
||||
raise PDFException("Parameters len filter mismatch")
|
||||
return zip(filters, params)
|
||||
|
||||
def decode(self):
|
||||
|
|
Loading…
Reference in New Issue