This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if you have not finished to install PyPDF2, please execute "pip install PyPDF2" or "{your python.exe path} -m pip install PyPDF2" | |
import PyPDF2 | |
pdf_files=["A.pdf","B.pdf","C.pdf"] # write merged pdf files path in order | |
pdf_name="D.pdf" # write new pdf file path (you canNOT write the path in pdf_files) | |
mem=PyPDF2.PdfFileMerger() | |
for pdf_file in pdf_files: | |
mem.append(pdf_file) |