Ensure inline image is parsed correctly

Requires pikepdf > 0.3.6
This commit is contained in:
James R. Barlow
2018-10-29 23:30:53 -07:00
parent ebf6acb318
commit 559e5269d2
+6 -1
View File
@@ -75,8 +75,13 @@ def strip_invisible_text(pdf, page, log):
return str(op).encode('ascii')
lines = []
for operands, operator in stream:
line = b' '.join(convert(op) for op in operands) + b' ' + operator.unparse()
if operator == pikepdf.Operator('INLINE IMAGE'):
iim = operands[0]
line = iim.unparse()
else:
line = b' '.join(convert(op) for op in operands) + b' ' + operator.unparse()
lines.append(line)
content_stream = b'\n'.join(lines)