Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

MergeMyPDF

A simple command-line tool written in Python to merge multiple PDF files into a single file.

This project was created as a learning exercise using argparse, pathlib and pypdf.

Features

  • Merge multiple PDF files
  • Keep files in the order provided
  • Validate input paths
  • Validate .pdf extensions
  • Choose the output file

Requirements

  • Python 3
  • pypdf

Installation

Clone the repository:

git clone https://github.com/iamsaturn/MergeMyPDF.git
cd MergeMyPDF

Create and activate a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

Install the dependencies:

pip install -r requirements.txt

Usage

Pass the PDF files in the order you want to merge them, followed by the output file:

python main.py first.pdf second.pdf -o merged.pdf

You can merge more than two files:

python main.py first.pdf second.pdf third.pdf -o merged.pdf

You can also use full paths:

python main.py "C:\Documents\first.pdf" "C:\Documents\second.pdf" -o "C:\Documents\merged.pdf"

Help

To see the available arguments:

python main.py --help

About

A simple command-line tool written in Python to merge multiple PDF files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages