Skip to content

Commit

Permalink
STY: Improve comment in PdfWriter._add_page
Browse files Browse the repository at this point in the history
Full credit to Lucas

Co-authored-by: "Cimon Lucas (LCM)" <[email protected]>
  • Loading branch information
MartinThoma and "Cimon Lucas (LCM)" committed Aug 14, 2023
1 parent 71ea4e1 commit 0ab320c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ def _add_page(
excluded_keys = list(excluded_keys)
excluded_keys += [PA.PARENT, "/StructParents"]
# acrobat does not accept to have two indirect ref pointing on the same
# page; therefore in order to add easily multiple copies of the same "
# page, we need to create a new dictionary for the page, however the "
# objects below (including content) is not duplicated
# page; therefore in order to add easily multiple copies of the same
# page, we need to create a new dictionary for the page, however the
# objects below (including content) are not duplicated:
try: # delete an already existing page
del self._id_translated[id(page_org.indirect_reference.pdf)][ # type: ignore
page_org.indirect_reference.idnum # type: ignore
Expand Down

0 comments on commit 0ab320c

Please sign in to comment.