Skip to content

A lightweight Python CLI tool to merge multiple PDF files into one. Built using the pypdf library, this script prompts users for input and merges selected PDFs into a single output file with a configurable name.

License

Notifications You must be signed in to change notification settings

SaurabhSSB/PDFMergerCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 PDFMergerCLI

A simple command-line tool to merge multiple PDF files into a single PDF using Python and the pypdf library.

🚀 Features

  • Merge multiple PDFs into one
  • Lightweight and beginner-friendly
  • Easily customizable output file name through a config file

🛠 Requirements

  • Python 3.6 or above
  • pypdf

Install the required package:

pip install pypdf

📁 Project Structure

PDFMergerCLI/
├── main.py         # Script to merge the PDF files
├── config.py       # Stores the output file name
└── README.md       # Project documentation

🔧 How to Use

  1. Clone the repository:
git clone https://github.com/yourusername/PDFMergerCLI.git
cd PDFMergerCLI
  1. Add the PDF files you want to merge in the same directory.

  2. Run the script:

python main.py
  1. 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
  1. The merged file will be saved with the name defined in config.py (default is Merger.pdf).

🧾 Configuration

Open config.py to change the output file name:

PDF_NAME = "MyCustomMergedFile.pdf"

✅ Example

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.pdf

Output: Merger.pdf containing all three.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙌 Contributing

Contributions, suggestions, and improvements are welcome! Feel free to fork the repository and submit a pull request.


Happy Merging! ✨

About

A lightweight Python CLI tool to merge multiple PDF files into one. Built using the pypdf library, this script prompts users for input and merges selected PDFs into a single output file with a configurable name.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages