This Python script merges multiple PDF files located in a specified folder into a single PDF file. It uses the PyPDF2 library for PDF manipulation.
Original Author: Haim Cohen
LinkedIn: Haim Cohen on LinkedIn
- Python installed on your machine
- PyPDF2 library installed (
shell > pip install PyPDF2
orpip install -r requirements.txt
)
- Clone this repository or download the
app.py
script. - Open a terminal and navigate to the directory containing the script.
- Run
shell > python app.py /path/to/pdf/files /path/to/merged/pdf/merged.pdf
# Example usage
python app.py /doc/pdf-files /doc/pdf-files/merged.pdf
Merged PDF saved to: /path/to/merged/pdf/merged.pdf