Created
January 30, 2024 18:47
-
-
Save billfitzgerald/2710b75b360d10a80343694991b7f342 to your computer and use it in GitHub Desktop.
Simple ugly script to merge pdfs - while pdfs are the Devil's Own Format, they are useful on occasion
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
from pypdf import PdfMerger | |
pdfs = ['pdf_1.pdf', 'pdf_2.pdf'] # pdfs to be merged, in order | |
output_name = 'merged_pdf' # filename of the merged pdfs | |
merger = PdfMerger() | |
for pdf in pdfs: | |
merger.append(pdf) | |
merger.write(output_name) | |
merger.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment