Python implementation of spliting pdfs
Requirements:
- python >= 3.8
- fitz
Install
Clone repo and install requirements.txt in a Python>=3.8.0 environment, including fitz>=0.0.1.
git clone https://github.com/sjtu-jhw/split_pdfs.git # clone
cd split_pdfs
pip install -r requirements.txt # install
Usage
Just need to specify the input PDF path and the path where you are prepared to save the split results.
For instance, if the PDF is located in the root directory with the name Template.pdf, and you want to save the split results in a folder named splits also in root, you can simply run a one-liner in the terminal to obtain your split results.
python split.py --pdf_path "./Template.pdf" --output_dir "./splits/"