Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created October 9, 2021 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiolucero/5e5e01cbc86e056f2e5f425ca9384995 to your computer and use it in GitHub Desktop.
Save sergiolucero/5e5e01cbc86e056f2e5f425ca9384995 to your computer and use it in GitHub Desktop.
how to merge PDF files
import glob
from PyPDF2 import PdfFileMerger
merger = PdfFileMerger()
for fn in glob.glob('*.pdf'):
merger.append(fn)
merger.write('merged.pdf')
merger.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment