pydfsplit
is a minimalist tool to split or merge pdf files.
- Split a pdf file in two files (pages 0 and 1 in one file, pages 2, 3 and so on in another):
pydfplit --split 2 "my_file.pdf"
- Merge two pdf files
pydfplit --append "second_file" --output "my_output.pdf" "first_file.pdf"
- A simple UI is available as well when called without any arguments.
Please use virtual environments when working on this project :
cd this/project/folder
python -m venv .
source bin/activate
The executable pydfsplit
can be compiled from the file pydfsplit.py
with pyinstaller :
cd this/project/folder
pyinstaller --clean --onefile --windowed pydfsplit.py --paths lib/python3.10/site-packages --add-data "lib/python3.10/site-packages/customtkinter:customtkinter"
Note that on Windows the path separator is ;
, not :
as shown above in the --add-data
option.
You can alternatively directly run the python file :
python pydfsplit.py [...]