A simple command-line tool to merge multiple PDF files into a single PDF using Python and the pypdf library.
- Merge multiple PDFs into one
- Lightweight and beginner-friendly
- Easily customizable output file name through a config file
- Python 3.6 or above
pypdf
Install the required package:
pip install pypdfPDFMergerCLI/
├── main.py # Script to merge the PDF files
├── config.py # Stores the output file name
└── README.md # Project documentation
- Clone the repository:
git clone https://github.com/yourusername/PDFMergerCLI.git
cd PDFMergerCLI-
Add the PDF files you want to merge in the same directory.
-
Run the script:
python main.py- Follow the on-screen prompts:
How many files you want to merge? 2
Enter the name of 1th file:- file1.pdf
Enter the name of 2th file:- file2.pdf- The merged file will be saved with the name defined in
config.py(default isMerger.pdf).
Open config.py to change the output file name:
PDF_NAME = "MyCustomMergedFile.pdf"Merging resume.pdf, portfolio.pdf, and certificate.pdf:
How many files you want to merge? 3
Enter the name of 1th file:- resume.pdf
Enter the name of 2th file:- portfolio.pdf
Enter the name of 3th file:- certificate.pdfOutput: Merger.pdf containing all three.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions, suggestions, and improvements are welcome! Feel free to fork the repository and submit a pull request.
Happy Merging! ✨