A powerful desktop application for PDF page management with dual-mode functionality. Easily remove unwanted pages or extract specific pages from PDF files through an intuitive graphical interface with visual page previews.
- π― Dual-Mode Operation:
- Remove Mode: Remove selected pages (red borders)
- Keep Mode: Keep only selected pages (green borders)
- π Load PDF Files: Open any PDF file through a file browser dialog
- πΌοΈ Visual Page Preview: High-quality thumbnail previews of all PDF pages
- π¨ Color-Coded Selection: Visual feedback with red/green borders based on mode
- β‘ Batch Operations: Select all pages or clear selection with dedicated buttons
- π Progress Tracking: Real-time progress bar and status updates during operations
- πΎ Smart Export: Save modified PDFs with intelligent operation summaries
- π Instant Access: Open created PDFs immediately or show in file explorer
- π§ No External Dependencies: Pure Python solution with no additional software required
- Python 3.7 or higher
- Windows 10/11 (tested on Windows 10)
- Additional dependencies will be installed via pip
For users who just want to use the application:
- Download the repository
- Run
PDF_Page_Modifier.exedirectly - No installation required! No Python, no dependencies, just double-click and go!
For developers or users who want to modify the code:
-
Clone or download this repository to your local machine
-
Install Python dependencies:
pip install -r requirements.txt
-
Run the application:
python pdf_page_modifier.py
To create your own executable:
- Install dependencies as in Option 2
- Run the build script:
build_executable.bat
- Find your executable in the
dist/folder
- Double-click
PDF_Page_Modifier.exe
- Run the application:
python pdf_page_modifier.py
-
Load a PDF file:
- Click the "Load PDF File" button
- Select your PDF file from the file browser
- Wait for page thumbnails to generate
-
Choose your mode:
- π΄ Remove Selected Pages: Select pages to remove (red borders)
- π’ Keep Selected Pages: Select pages to keep (green borders)
-
Select pages:
- Click on page thumbnails to select/deselect them
- Selected pages show colored borders matching your chosen mode
- Use "Select All Pages" to select all pages
- Use "Clear Selection" to deselect all pages
-
Save and access your PDF:
-
Left Panel (Controls):
- Load PDF File button
- File information display (filename and page count)
- Mode selection radio buttons (Remove/Keep)
- Page selection information with dynamic text based on mode
- Select All/Clear Selection buttons
- Progress bar and status display
- Save Modified PDF button
-
Right Panel (Page Preview):
- Scrollable grid of high-quality page thumbnails (4 columns)
- Click thumbnails to toggle selection
- Color-coded borders:
- π΄ Red borders: Pages to remove (Remove mode)
- π’ Green borders: Pages to keep (Keep mode)
- βͺ White background: Unselected pages
-
Bottom: Interactive usage instructions
-
Success Dialog (after saving):
- β Success confirmation with operation summary
- π "Open PDF" button to instantly view the created file
- π "Show in Folder" button to locate the file
- β¨οΈ Keyboard shortcuts (Enter to open, Escape to close)
Use Case: Remove unwanted pages from a PDF
- Visual: Selected pages have red borders
- Action: Selected pages are removed from the final PDF
- Examples:
- Remove advertisement pages
- Remove blank pages
- Remove specific chapters or sections
- Remove cover pages
Use Case: Extract specific pages from a PDF
- Visual: Selected pages have green borders
- Action: Only selected pages are kept in the final PDF
- Examples:
- Extract specific pages for sharing
- Create a summary with key pages
- Extract diagrams or charts
- Create a custom document from multiple sources
- Dynamic visual feedback: Colors change automatically when switching modes
- Preserved selection: Your page selection remains when switching modes
- Smart labeling: Interface text updates to match the current mode
-
"No module named 'fitz'" error:
- Make sure you've installed all requirements:
pip install -r requirements.txt - PyMuPDF should install automatically with the name 'fitz'
- Make sure you've installed all requirements:
-
"Unable to get page count" or similar PDF errors:
- Ensure the PDF file is not corrupted or password-protected
- Try with a different PDF file
-
Application freezes when loading large PDFs:
- This is normal for large PDFs - the application processes pages in the background
- Wait for the progress bar to complete
- Large PDFs (100+ pages) may take longer to load due to thumbnail generation
- The application uses threading to prevent GUI freezing during operations
- High-quality thumbnails are generated at 1.5x scale for better preview
- Consider closing other applications if you experience memory issues with very large PDFs
- PyMuPDF provides faster processing compared to traditional PDF libraries
- GUI Framework: tkinter (Python standard library)
- PDF Processing: PyPDF2 for writing PDFs, PyMuPDF for reading and image generation
- Image Processing: Pillow (PIL) for image handling
- PDF to Image Conversion: PyMuPDF (fitz) - no external dependencies required
- Threading: Used for non-blocking PDF operations
This project is open source and available under the MIT License.
Feel free to submit issues, feature requests, or pull requests to improve the application.

