Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,8 @@ def replace_in_obj(
# remove orphans (if applicable)
orphans[self.root_object.indirect_reference.idnum - 1] = False # type: ignore

orphans[self._info.indirect_reference.idnum - 1] = False # type: ignore
if self._info is not None:
orphans[self._info.indirect_reference.idnum - 1] = False # type: ignore

try:
orphans[self._ID.indirect_reference.idnum - 1] = False # type: ignore
Expand Down
Loading