The PDF Splitter Script is a Python tool that simplifies the process of breaking down large PDF files into smaller groups of pages. Users can customize the splitting based on the number of pages per group, providing a user-friendly solution for managing and organizing PDF documents. The script includes error handling for smooth execution and is part of the PDF Splitter GitHub repository. Developed for personal use, users are encouraged to report issues for timely resolution.
- Python Installed: Ensure you have Python installed on your system. You can download and install Python from the official Python website.
- Download the Script: Copy the provided Python script into a file named
splitter.py. - Input PDF File: Change filename to
input.pdfand put it in the script directory.
-
Open Terminal/Command Prompt:
- On Windows, open Command Prompt.
- On macOS and Linux, open Terminal.
-
Navigate to the Script Directory:
- Use the
cdcommand to change your current directory to where thesplitter.pyfile is located. For example:cd path/to/script-directory
- Use the
-
Run the Script:
- Type the following command and press Enter to run the script:
python splitter.py - The script will execute and prompt you for the required information.
- Type the following command and press Enter to run the script:
-
Choose a Name for Output Files
Enter the desired name for saving the files (without extension): -
Specify Number of Pages per Group
How many pages per group do you want to split? (Enter a number): -
Confirmation:
- If the total number of pages in the input PDF is not divisible by the specified number, you'll see a warning. Confirm by typing
yes/yorno/nto proceed or cancel the operation. -
- If you confirm an indivisible operation, your PDF file will be split with the remainder.
- If the total number of pages in the input PDF is not divisible by the specified number, you'll see a warning. Confirm by typing
- Error Handling:
- The script includes error handling to ensure smooth execution. If there are any issues, the script will display appropriate messages.
π This script made for myself. You can report about issues and I fix it ASAIC (As Soon As I Can) π
Image by stockgiu on Freepik