Should be inside the namespace of whatever we're iterating over and should alias the iterator variable. This will help ensure we bump the timestamp of merger in cell 2 in the following example:
# cell 1
from pypdf import PdfWriter
merger = PdfWriter()
with open("doc-input.pdf", "rb") as f:
merger.merge(fileobj=f, position=0)
# cell 2
from pypdf import PdfReader
reader = PdfReader("form.pdf")
for page, to_merge in zip(merger.pages, reader.pages):
page.merge_page(to_merge, over=True)
Should be inside the namespace of whatever we're iterating over and should alias the iterator variable. This will help ensure we bump the timestamp of
mergerin cell 2 in the following example: