A simple Python utility for merging PDF files using PyPDF. This tool provides two modes:
Merges pages from odd.pdf and even.pdf in alternating sequence (reconstruct double-sided scans split into odd and even pages).
Required input files:
odd.pdfeven.pdf
Result:
merged.pdfwith interleaved pages (odd-even-odd-even...)
Appends all pages of append.pdf to the end of original.pdf.
Required input files:
original.pdfappend.pdf
Result:
merged.pdfcontainingoriginal.pdffollowed byappend.pdf
- Python 3.6+ (Coded and tested using Python 3.13 but expected to work with 3.6).
- pypdf 5.0.0+
- Ensure the relevant PDF files are named as required (see above).
- Run the script:
python merge_pdf.py