Skip to content

Commit

Permalink
Fix KeyError '/Subtype'
Browse files Browse the repository at this point in the history
Fixes #1350
  • Loading branch information
jbarlow83 committed Jul 9, 2024
1 parent fac91fc commit 4dde378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocrmypdf/pdfinfo/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def _find_form_xobject_images(pdf: Pdf, container: Object, contentsinfo: Content
xobjs = resources[Name.XObject].as_dict()
for xobj in xobjs:
candidate = xobjs[xobj]
if candidate is None or candidate[Name.Subtype] != Name.Form:
if candidate is None or candidate.get(Name.Type) != Name.Form:
continue

form_xobject = candidate
Expand Down

0 comments on commit 4dde378

Please sign in to comment.