Created
July 24, 2022 22:31
-
-
Save sergiolucero/83c2d50264a26362dcaf1eefdb89fc4c to your computer and use it in GitHub Desktop.
concatenate and merge a list of PDF files
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
import glob | |
from PyPDF2 import PdfFileMerger | |
merger = PdfFileMerger() | |
for fn in glob.glob('*.pdf'): | |
merger.append(fn) | |
merger.write('result.pdf') | |
merger.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment