Skip to content

This Python script allows you to split a large PDF file into smaller PDF files. You can specify the input PDF file, the prefix for the output files, and the number of pages per small file.

License

warshipfucker/pdfsplitter

Repository files navigation

pdfsplitter

This Python script allows you to split a large PDF file into smaller PDF files. You can specify the input PDF file, the prefix for the output files, and the number of pages per small file.

Usage Windows

  1. Download release - Exe File
  2. Put the big pdf file (the file you want to split) to same folder with pdfsplitter.exe file
  3. Run pdfsplitter.exe
  4. Follow the on-screen instructions to split your PDF file:
  • Enter the name of the large PDF file (with or without .pdf ending).
  • Enter the prefix for the output files.
  • Enter the number of pages per small file.
  1. The script will create a folder with the same name as the input PDF file (without the .pdf extension) and save the smaller PDF files there.
  2. The process is completed, and you will find the splited PDF files in the specified folder.

Requirements

  • Python 3.x
  • PyPDF2 library (you can install it using pip install PyPDF2)

Usage of source code

  1. Download and install Python from the official website.
  2. Open a terminal or command prompt.
  3. Clone or download this repository to your computer.
  4. Navigate to the directory where the script is located.
  5. To install the required PyPDF2 library, open a terminal or command prompt, navigate to the directory with the script, and run the following command: pip install -r requirements.txt or pip install PyPDF2
  6. Run the script using the following command: python3 pdfsplitter.py or python pdfsplitter.py
  7. Follow the on-screen instructions to split your PDF file:
  • Enter the name of the large PDF file (with or without .pdf ending).
  • Enter the prefix for the output files.
  • Enter the number of pages per small file.
  1. The script will create a folder with the same name as the input PDF file (without the .pdf extension) and save the smaller PDF files there.
  2. The process is completed, and you will find the split PDF files in the specified folder.

Example

Suppose you have a large PDF file named example.pdf, and you want to split it into smaller files with a prefix of output and 10 pages per small file. You would run the script as follows:

Enter the following when prompted:

  • Enter the name of the large PDF file: example.pdf
  • Enter the prefix for the output files: output
  • Enter the number of pages per small file: 10

The script will create a folder named example and save the split PDF files inside.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

This Python script allows you to split a large PDF file into smaller PDF files. You can specify the input PDF file, the prefix for the output files, and the number of pages per small file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages