Skip to content

Commit d347078

Browse files
authored
Update _page.py
fixed code style
1 parent eb6b294 commit d347078

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pypdf/_page.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ def _get_ids_image(
461461
if PG.RESOURCES in obj:
462462
if RES.PATTERN in cast(DictionaryObject, obj[PG.RESOURCES]):
463463
for patternName, pattern in obj[PG.RESOURCES][RES.PATTERN].items():
464-
if PG.RESOURCES in pattern.get_object():
465-
if RES.XOBJECT in cast(DictionaryObject, pattern[PG.RESOURCES]):
464+
if PG.RESOURCES in pattern.get_object() and RES.XOBJECT in cast(DictionaryObject, pattern[PG.RESOURCES]):
466465
x_object = pattern[PG.RESOURCES][RES.XOBJECT].get_object() # type: ignore
467466
for o in x_object:
468467
if not isinstance(x_object[o], StreamObject):

0 commit comments

Comments
 (0)