PrintCost
Automatic Print Cost Estimator
- Role
- Full Stack Desktop Developer
- Client
- Personal Project / Public Distribution
- Duration
- 2026-02-15 — 2026-03-05
- Year
- 2026
- Team
- 1 persona

Problem
What needed to be solved?
Manual estimation of printing costs is error-prone and time-consuming, especially in high-volume environments.
Solution
How was it solved?
Developed an automated system that analyzes PDF documents and calculates printing costs based on per-channel CMYK ink coverage.
Features
What it does
- Per-page CMYK coverage analysis using PyMuPDF rendering and NumPy vectorized computation
- Automatic detection of new PDFs via Watchdog in monitored directories
- Cost calculation based on ink price and consumption (ml per channel)
- Job queue with per-job printer selection
- Silent printing to physical printers via Sumatra PDF
- Job history stored in SQLite with filtering by day, month, and date
- Report export in Excel, CSV, letter-size PDF, and 80mm receipt PDF
- Custom paper types (e.g., cardstock, photo paper, sticker)
- Advertising banner system with local cache and asynchronous image downloads
- Light and dark mode with full theme support
- System tray integration for background operation
- Copy selector with real-time cost recalculation
- Editable suggested pricing per job
Responsibilities
My role in the project
- Designed and implemented the full application architecture
- Developed the CMYK analysis engine using PyMuPDF and NumPy
- Built the desktop UI using CustomTkinter
- Integrated with Windows printing APIs via pywin32
- Designed the persistence layer using SQLite and JSON
- Implemented the banner system with local caching and async downloads
- Built multi-format reporting using ReportLab and OpenPyXL
Technical Challenges
What wasn’t trivial
Print job interception
Intercepting print jobs without relying on a specific printer brand, solved by using a virtual printer (e.g., PDFCreator) as an intermediary
CMYK estimation
Estimating CMYK ink coverage without access to the printer RIP, solved via RGB→CMYK conversion per channel using NumPy over rendered pages
Silent printing on Windows
Reliably forwarding jobs to physical printers in silent mode using Sumatra PDF with a ShellExecute fallback
Data persistence
Separating user data from the executable to support updates without data loss, implemented using AppData/Local/PrintCost
Efficient document processing
Processing 50–100 page documents without blocking the UI, solved using ThreadPoolExecutor for parallel page analysis and optimized rendering DPI
Results
What was achieved
- Reduced analysis time by ~70% by transitioning from sequential to parallel processing with optimized DPI
- Delivered a fully automated system that detects, analyzes, and forwards print jobs end-to-end
- Implemented a complete job history system with profit tracking by day and month, ready for real-world usage
- Built a modular architecture that can scale into a SaaS or POS-integrated solution
- win32print RAW mode is not compatible with most consumer inkjet printers, which require routing through the Windows driver
- CustomTkinter on Python 3.14 presents inconsistencies with grab_set and CTkScrollableFrame, requiring specific workarounds
- RGB→CMYK conversion is a practical approximation for cost estimation but does not replace true RIP-level analysis
- Separating user data into AppData from the start prevents migration issues when packaging installers