A comprehensive ComfyUI custom node collection for PDF processing with AI-powered analysis.
The download functionality has moved to a separate package:
- PDF Tools (this package): PDF extraction, OCR, AI vision processing
- Download Tools (new package): gallery-dl and yt-dlp downloaders
If you need the download nodes (yt-dlp, gallery-dl), please install the download-tools package separately:
cd ComfyUI/custom_nodes/download-tools
.\install.ps1Both packages work independently and can be installed together or separately.
-
Check Installation:
cd A:\Comfy25\ComfyUI_windows_portable powershell -ExecutionPolicy Bypass -File .\ComfyUI\custom_nodes\PDF_tools\check_install.ps1
-
Install Dependencies:
- The check script will offer to install everything
- Or manually run:
.\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\PDF_tools\requirements.txt
-
Start ComfyUI:
- Run your normal startup script
- Nodes will appear in the "Add Node" menu
- PDF Extractor v08 - Advanced PDF image extraction with quality assessment and spread detection
- PDF Extractor v09 - Latest version with enhanced image processing
- PDF Extractor v05-v07 - Previous versions for compatibility
- Simple PDF Extractor - Basic PDF extraction without advanced features
- Surya OCR Layout Node - State-of-the-art multilingual OCR with layout detection
- Surya Layout OCR Hybrid - Combined layout analysis and text extraction
- Basic Surya / Basic Surya v02 - Simplified Surya OCR interfaces
- Enhanced Layout Parser v06 - Advanced document layout understanding
- LayoutLMv3 Node - Microsoft LayoutLMv3 for document AI
- Florence2 Rectangle Detector - Microsoft Florence-2 for object detection and vision analysis
- Florence2 Cropper Node - Crop images based on Florence-2 detections
- Eric Rectangle Detector - Custom rectangle detection implementation
- PaddleOCR VL Remote - Remote PaddleOCR processing for Chinese/multilingual documents
Note: Download functionality has moved to the download-tools package. Install it separately if you need gallery-dl or yt-dlp downloaders.
✅ PDF Extraction - Extract images from PDFs with quality scoring and duplicate detection
✅ AI-Powered OCR - Surya, PaddleOCR, LayoutLMv3 for accurate text extraction
✅ Layout Analysis - Understand document structure (headers, paragraphs, tables, figures)
✅ Vision Models - Florence-2 for object detection and image understanding
✅ Spread Detection - Automatically detect two-page spreads in scanned documents
✅ Quality Assessment - Evaluate image sharpness, contrast, and overall quality
✅ Batch Processing - Process multiple PDFs or images efficiently
✅ GPU Acceleration - Leverage CUDA for faster AI model inference
- INSTALLATION_SUCCESS.md - Installation complete? Read this!
- INSTALLATION_GUIDE.md - Detailed setup instructions
- CODE_OVERVIEW.md - Understanding the codebase
- requirements.txt - All Python dependencies
gallery_dl_node_complete_guide.md- Gallery-dl usage guideyt_dlp_node_complete_guide.md- Yt-dlp usage guideSETUP_COMPLETE.md- Authentication configuration- Test scripts for all features
- PyMuPDF (fitz) - PDF processing
- Pillow - Image processing
- numpy - Array operations
- opencv-python - Computer vision
- transformers - AI models
- gallery-dl - Web media downloader
- yt-dlp - Video/audio downloader
- browser-cookie3 - Cookie extraction
- FFmpeg - For yt-dlp audio extraction (download separately)
- Tesseract - For enhanced OCR (download separately)
Important: This repository uses template config files to protect your personal credentials.
- Copy template files:
configs/*.example→ remove.exampleextension - Edit with your credentials (usernames, passwords, API keys)
- Your personal configs are automatically excluded from Git
See CONFIG_SETUP.md for detailed instructions.
Your personal configuration files (without .example) will never be committed to GitHub! 🔒
Node: Gallery-dl Downloader
URL: https://www.instagram.com/username/
Output: ./instagram-downloads
Enable: organize_files, use_download_archive
Node: Yt-dlp Downloader
URL: https://www.youtube.com/watch?v=VIDEO_ID
Format: best (or audio-only for music)
Output: ./youtube-downloads
Node: PDF Extractor v08
Input: Your PDF file
Output: ./pdf-output
Enable: quality_assessment, spread_detection
Many sites (Instagram, Reddit) require authentication:
Option 1: Browser Cookies
- Log into site in browser
- Enable
use_browser_cookiesin node - Select browser (Firefox, Chrome, etc.)
Option 2: Export Cookies
- Install browser extension "Get cookies.txt LOCALLY"
- Export cookies while logged in
- Save to
configs/instagram_cookies.json - Set
cookie_fileparameter
PDF_tools/
├── nodes/ # ComfyUI node implementations
├── florence2_scripts/ # Florence2 AI vision models
├── sam2_scripts/ # SAM2 segmentation models
├── configs/ # Authentication & config files
├── Docs/ # Comprehensive documentation
└── [test directories] # Test output locations
- Windows 10/11 (primary), Linux (should work)
- Python 3.10+ (included with ComfyUI)
- NVIDIA GPU with CUDA (recommended for AI models)
- 8GB+ RAM (16GB+ for AI models)
- 5-10GB storage for packages + models
✅ Already installed! Use: .\python_embeded\python.exe -m gallery_dl
💡 Solution: Run ComfyUI as admin, or use Firefox, or export cookies
💡 Solution: Export cookies from logged-in browser session
💡 Solution: Close other GPU apps, reduce batch size, use smaller models
See INSTALLATION_GUIDE.md for detailed troubleshooting.
- Use Download Archives - Enable to avoid re-downloading
- Enable File Organization - Keep downloads sorted by type
- Export Cookies for Private Content - More reliable than browser cookies
- Start with Public URLs - Test setup before authenticated downloads
- Monitor GPU Usage - When using AI models
- Gallery-dl: 1.30.9 ✅
- Yt-dlp: 2025.9.5 ✅
- PyMuPDF: 1.26.4 ✅
- Transformers: 4.55.0 ✅
- Torch: 2.7.1+cu128 ✅
This is a working codebase! If you extend it:
- Follow existing patterns
- Add comprehensive error handling
- Include debug output
- Update documentation
- Test with real data
Copyright (c) 2025 Eric Hiss. All rights reserved.
This software is dual-licensed:
- Non-Commercial Use: Licensed under Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
- Commercial Use: Requires a separate commercial license. Contact: eric@historic.camera or eric@rollei.us
See LICENSE.md for full licensing terms.
This project relies on numerous open-source libraries, each with its own license. See CREDITS.md for a comprehensive list of all dependencies and their licenses.
Important License Notes:
- Some dependencies (gallery-dl, PyMuPDF) use GPL/AGPL licenses
- Commercial use requires compliance with all dependency licenses
- See CREDITS.md for detailed licensing information
Contributions are welcome! Please see CONTRIBUTING.md for guidelines on:
- Code style and standards
- Testing requirements
- Pull request process
- Development setup
- Author: Eric Hiss
- GitHub: EricRollei
- Email: eric@historic.camera, eric@rollei.us
Special thanks to:
- The ComfyUI community for the amazing platform
- Hugging Face for hosting models and providing ML tools
- Microsoft Research for Florence-2 vision models
- Meta AI for SAM2 (Segment Anything Model 2)
- All open-source developers whose libraries make this project possible
See CREDITS.md for detailed acknowledgments.
- ✅ Check installation: Run
check_install.ps1 - ✅ Read: INSTALLATION_SUCCESS.md
- ✅ Start ComfyUI: Nodes will appear automatically
- ✅ Test: Try a simple download
- ✅ Configure: Set up authentication if needed
Ready to go! All dependencies are installed. Read INSTALLATION_SUCCESS.md for next steps.
- LICENSE.md - Full license terms
- CREDITS.md - Third-party libraries and acknowledgments
- CONTRIBUTING.md - Contribution guidelines