Scan it, read it, name it, ship it
Three commands do the whole job:
scanfeeds paper through the document scanner at 600 DPI (one- or two-sided), makes a searchable PDF and offers to send it.ocr file.pdfmakes an existing PDF searchable, straightens and rotates its pages, works out its title and renames it, e.g.2026-10-05 - Annual Water Quality Report.pdf.send-to desktopdelivers files to a shared folder on a Windows PC, or opens a file picker if you don’t name any.
How it finds the title
The trickiest part was naming files the way a person would. The title detector reads where every line sits on page 1 and how big it is. It skips page furniture like addresses, phone numbers and dates, and repairs words OCR splits in two (“STATE MENT” → “STATEMENT”). It also joins headings that wrap onto two lines, then scores each candidate: big, near the top, centered, and containing words like Invoice, Report or Notice. You can always type your own title instead.
Security Considerations
It installs without sudo and never overwrites settings you’ve already edited. It escapes awkward filenames before handing them to Windows and keeps the credentials file locked down. It also exits with an error if any file fails, so it can run inside other scripts. A step-by-step PowerShell guide sets up the Windows side in about five minutes.
What I learned
Although I am less familiar with bash, I am definitely not a fan of PowerShell or windows administration. The windows set up side was more annoying and time intensive. This process also provoked thoughts about networking security and lead to me considering various improvements to my home network that previously I did not concern myself with.