How itssp00ky/pdf_enhancer works
PDF Enhancer is a local desktop app that takes PDFs and images, lets users choose DPI and preview the first item, then processes pages into a combined, compact PDF. Its principal flow runs from file selection through page loading and image enhancement to export; background workers keep the interface responsive. README-described geometry correction, drag-and-drop, and output compression are represented as capabilities of the single-file runtime. The source is concentrated in main.py; omitted excerpts limit confidence in some internal call relationships.
Main entry points: main.py File selection
Components 13
Desktop interface
- Scanner app
main.py - File selection
main.py - First-page preview
main.py - Background workers
main.py
Document input
- Page loading
main.py - PDF rendering
main.py - Image loading
main.py
Page processing
- Geometry correction
main.py - Binarization
main.py - Page processing
main.py
PDF output
- PDF export
main.py - Enhanced PDF
Other components
- User
Connections 15
- User → Scanner app: uses
README.md - Scanner app → File selection: offers
main.py - User → File selection: selects files
README.md - User → File selection: drops files
README.md - File selection → First-page preview: requests preview
README.md - File selection → Background workers: starts conversion
main.py - First-page preview → Page loading: previews first item
main.py - Background workers → Page loading: iterates pages
main.py - Page loading → PDF rendering: renders PDF pages
main.py - Page loading → Image loading: loads image files
main.py - Background workers → Page processing: processes each page
main.py - Page processing → Geometry correction: corrects geometry
main.py - Page processing → Binarization: enhances contrast
main.py - Background workers → PDF export: exports pages
main.py - PDF export → Enhanced PDF: writes PDF