Skip to content

About

A simple Python project that merges multiple PDF files from a folder into a single PDF file. Each merged output is saved with a unique timestamped filename, so previous files are never overwritten.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Merger (Python)

A simple Python project that merges multiple PDF files from a folder into a single PDF file.
Each merged output is saved with a unique timestamped filename, so previous files are never overwritten.


Features

  • Merge all PDFs from a folder into one PDF
  • Automatically generates a unique output filename
  • Clean, scalable project structure
  • Uses a Python virtual environment (venv)
  • Minimal dependencies

Step 2: Create a Virtual Environment macOS / Linux python3 -m venv venv

Step 3: Activate the Virtual Environment macOS / Linux source venv/bin/activate

Step 4: Install Dependencies

Install the required Python packages using:

pip install -r requirements.txt

Got it! Let’s make a **fully polished, professional, copy-paste-ready `README.md` section** starting from Step 4, with clear headings, code blocks, examples, and tips — all in **one go**. I’ve also corrected minor formatting issues, added consistent styling, and made it GitHub-friendly.

Here’s the final version:

````markdown
## Step 4: Install Dependencies

Install the required Python packages using:

```bash
pip install -r requirements.txt

This will install all dependencies, including:

  • pypdf – used for merging PDF files

Step 5: Add PDF Files

Place all the PDF files you want to merge into the following folder:

data/input_pdfs/

Example Folder Structure:

data/input_pdfs/
├── file1.pdf
├── file2.pdf
└── file3.pdf

Note: PDF files are merged alphabetically by filename.


Step 6: Run the Merger

From the project root directory, run:

python run.py

Output Location

Merged PDFs are saved to:

data/output/

Example Output Filename:

merged_20260112_143522.pdf

Each run creates a new file, so no existing files are overwritten.

Example Console Output:

✅ PDFs merged successfully!
📄 Output file: data/output/merged_20260112_143522.pdf

Step 7: Deactivate the Virtual Environment

Once you are done working on the project:

deactivate

Tips

  • Keep your input PDFs organized and avoid duplicate filenames.
  • Ensure all PDFs are readable and not password-protected for smooth merging.
  • You can run the script multiple times; each run generates a new output file with a timestamp.

About

A simple Python project that merges multiple PDF files from a folder into a single PDF file. Each merged output is saved with a unique timestamped filename, so previous files are never overwritten.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages