Processing pipeline

Allow sending scan from device to computer for some HP All-in-One Printers - Scan to computer

Processing pipeline

How captured scans move from the printer to their destination(s), and why the capture loop stays responsive.

Short version: capturing and delivering a scan are now decoupled. Capturing stays close to the printer; delivering happens on a background FIFO queue (and the PDF merge in a dedicated worker thread), so the loop keeps polling during slow uploads or heavy processing.

Why

In listen and adf-autoscan mode the app used to wait for the whole post-processing (PDF merge, uploads, webhook delivery, cleanup) before polling the printer again. A large scan or a slow destination could make the loop miss the next scan event or trip the printer’s userActionTimeout / waitScanNewPageRequest timeouts.

What changed

Testing

test/processingQueue.test.ts covers the queue (enqueue returns before the work completes, FIFO order, awaited single-job path). PDF merge and delivery are covered by the existing suites; scripts/live-test.sh smoke-tests the main flows against a real printer.


Back to README · Source