A simple Python Script to combine PDFs and Images (jpg | png | jpeg).
- Create a virtual environment
$ python3 -m venv /path/to/new/virtual/env
. - Install required packages using
$ pip3 install -r requirements.txt
.
- Run the script as
python3 main.py {PDF/Image file paths} {Output PDF file path}
-
To combine
file1.pdf
,file2.jpg
,file3.png
into a pdfoutput.pdf
in the respective order.python3 main.py file1.pdf file2.jpg file3.png output.pdf