Skip to content

This project is a Python tool designed to separate color and black & white pages from a PDF file into two separate PDF files. It utilizes the PyMuPDF library to read and manipulate PDF files, distinguishing between color and black & white pages based on page color mode.

License

Notifications You must be signed in to change notification settings

RicePasteM/Color-BW-Separator-for-PDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color and Black & White Separator for PDF

This tool is used to separate color and black & white pages from a PDF file into two separate PDF files.

Languages

简体中文

Installation Instructions

  1. Install the libraries:
pip install pymupdf
pip install numpy
pip install tqdm

Usage Guide

  1. Place the PDF file to be separated in INPUT_PDF_PATH.
  2. Run the main.py script.
python main.py
  1. Choose whether to use double-sized printing mode by configuring IS_DOUBLE_SIZED_PRINTING
  2. The separated color pages will be saved in color_pages.pdf, and black & white pages will be saved in bw_pages.pdf.

Contributing

Contributions are welcome! If you find any issues or have any suggestions, please raise an issue. If you'd like to contribute code, please fork this repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

This project is a Python tool designed to separate color and black & white pages from a PDF file into two separate PDF files. It utilizes the PyMuPDF library to read and manipulate PDF files, distinguishing between color and black & white pages based on page color mode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages