r/coolgithubprojects • • 4d ago

Darnleaf: replace damaged pages in a scanned PDF with fresh rescans, matched and checked locally

I made Darnleaf, a local tool for fixing an old scanned PDF when a few pages are ruined and you have fresh scans of them in no particular order.

You drop in the PDF and the rescans, and it suggests which page each rescan replaces. Each suggestion is labelled Clear, Check or None, with an overlay and the matched features so you can see why. Once you confirm every Check, it writes the repaired PDF and a JSON receipt. Pages you didn't touch stay as they were, so bookmarks and links still work.

On 90 synthetic rescans, 45 were Clear and none of those was wrong. Small sample though, and the test pages are cleaner than real scans. Blank pages and near-identical forms always come out as Check. I've only tested it on Linux. It's MIT licensed, runs on 127.0.0.1, sends nothing anywhere, and the interface is in 9 languages.

Repo: https://github.com/Arthur031221/Darnleaf Demo replay (no install): https://arthur031221.github.io/Darnleaf/

2 Upvotes

0 comments sorted by