· via Hacker News – Front Page (native)
OCR It turns unselectable document viewers into LLM-ready text with local Tesseract
An open-source Chrome extension that reached Hacker News's front page captures a pinned screen region on every page, OCRs it with bundled Tesseract entirely offline, and exports a transcript ready for an LLM.
What it is
OCR It, an open-source Chrome extension that landed on the Hacker News front page on 24 August, targets a familiar dead end: a scanned book, slide deck or web reader that displays pages but blocks text selection. According to the project's GitHub repository, the idea is to mark a capture region once and then press a hotkey on each page; every press screenshots that exact rectangle, runs OCR on it, and appends the result to a running transcript.
Recognition runs with a bundled Tesseract build, entirely on the local machine. The extension makes no outbound requests at all, so there are no API keys to configure and no screenshots ever leave the computer.
How a capture works
Setup is deliberately bare-bones: clone the repository, enable Developer mode at chrome://extensions, and load the folder unpacked. There is no build step; everything needed is committed, and npm is only required for running tests or re-vendoring language data.
Three hotkeys drive the tool. One draws or redraws the capture region over the text, with drag handles and arrow-key nudging for pixel-level adjustment before saving. A second captures the region on demand — the screenshot is taken immediately while OCR queues in the background, so there is no waiting between pages, and the toolbar icon doubles as a counter of pending reads. A third starts and stops automatic runs.
Letting it run unattended
With a next-page control configured, OCR It can take over completely: capture, advance, repeat until the document ends. The page-turn target is set either by clicking the viewer's own next-page button, or by dispatching a synthetic keypress (ArrowRight by default) into whatever frame owns the middle of the capture region.
The README explains one design choice in detail: each cycle waits for the current page's OCR to finish before turning. The author says this costs nothing in practice because recognition is faster than a page turn, and it buys reliable end detection — a loop driven only by a timer would race past the final page and duplicate it endlessly. Runs stop themselves after two identical pages (the default), when the page can no longer be turned, on OCR failure or a stall, at a 300-page cap, or when the tab closes. Whatever ended a run is reported in the popup.
A point instead of a selector
The stored next-page target is a screen coordinate, not a CSS selector. Per the project's documentation, that lets it survive the DOM re-rendering that routinely invalidates selectors, and it reaches two places a selector cannot: cross-origin iframes, where most embedded readers live, and shadow DOM, which querySelector cannot see into. At advance time every frame is offered the point and the one that owns it synthesises the full pointerdown-through-click sequence, so viewers that page on pointerdown behave the same as those listening for clicks.
Limits and output
The constraints are documented plainly. Because the target is a fixed point on screen, resizing the window or changing zoom mid-run breaks it. Chrome's built-in PDF viewer works for manual capture but auto-advance cannot reach it, since the viewer is a plugin that extensions cannot inject into; PDFs opened from file:// URLs also require enabling file access for the extension. English, Portuguese and Spanish ship by default, and any of Tesseract's roughly hundred other languages must be vendored into the extension first.
Exported pages appear with thumbnails of exactly what was cropped, so a drifted region is obvious immediately rather than dozens of pages later. Text is editable in place, individual pages can be re-recognised, copy-all and .txt export emit pages in order behind page-number separators, and pages identical to the previous one are flagged as duplicates.
Why it matters
A huge amount of reference material is trapped in viewers that render pixels instead of text. This converts those hundreds of pages into a plain text file — the natural input for Claude, ChatGPT or any other LLM to summarise, search or answer questions about. The fully offline OCR is a meaningful privacy property at a moment when the easy route is a screenshot round-trip through a cloud API, and the point-not-selector technique for clicking into cross-origin iframes and shadow DOM is a piece of engineering other extension authors will want to borrow. The developer-mode install keeps it a hobbyist tool for now, but having fully auditable code is part of the appeal.
- #chrome-extension
- #ocr
- #tesseract
- #open-source
- #llm-tools