pypdf Merging multiple pdf files into one pdf

后端 未结 5 1685
南笙
南笙 2020-12-01 03:13

If I have 1000+ pdf files need to be merged into one pdf,

input = PdfFileReader()
output = PdfFileWriter()
filename0000 ----- filename 1000
    input = PdfFi         


        
5条回答
  •  萌比男神i
    2020-12-01 03:47

    It maybe just what it says, you are opening to many files. You may explicitly use f=file(filename) ... f.close() in the loop, or use the with statement. So that each opened file is properly closed.

提交回复
热议问题