The following code fails to write the output for the second page of the attached PDF. With the fix in the pull request it does work as expected.
Although I'm not quite sure if this is just a symptom of another problem that manifests itself there.
from PyPDF3 import PdfFileWriter, PdfFileReader
if __name__ == '__main__':
input_pdf = PdfFileReader('2022-02-03_regiogis.pdf', strict=True)
for p in [0, 1]:
page = input_pdf.getPage(p)
output_pdf = PdfFileWriter()
output_pdf.addPage(page)
with open('Page{}.pdf'.format(p), 'wb') as of:
output_pdf.write(of)
The following code fails to write the output for the second page of the attached PDF. With the fix in the pull request it does work as expected. Although I'm not quite sure if this is just a symptom of another problem that manifests itself there.
2022-02-03_regiogis.pdf