Ensure XObjects with no subtype don't cause an exception

Closes #325
This commit is contained in:
James R. Barlow
2019-01-08 16:46:08 -08:00
parent 72337094ca
commit e3a58219d1
+2
View File
@@ -391,6 +391,8 @@ def _image_xobjects(container):
xobjs = resources['/XObject'].as_dict()
for xobj in xobjs:
candidate = xobjs[xobj]
if not '/Subtype' in candidate:
continue
if candidate['/Subtype'] == '/Image':
pdfimage = candidate
yield (pdfimage, xobj)