Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“„ PDF Text Extractor

PDF Text Extractor โ€” extract all the text from any PDF in your browser

โ–ถ Live demo โ€” bros-ai.github.io/pdf-text-extractor

License: MIT No build step 100% client-side

A single-file, zero-install web app that extracts all text from PDFs โ€” entirely in your browser. Drag & drop a PDF and get its text instantly, with automatic OCR for scanned pages.

โœจ Features

  • Hybrid extraction (best of both worlds)
    • Native text layer read with pdf.js โ€” instant and lossless for digital PDFs, with layout-aware line reconstruction
    • Automatic OCR fallback with Tesseract.js โ€” scanned pages are rendered at high resolution (~2400 px) and recognized, with a per-page confidence score
  • Drag & drop anywhere, click to browse, or paste a PDF with Ctrl+V โ€” multi-file supported
  • Modes: Auto (hybrid) ยท Text layer only (fast) ยท Force OCR
  • OCR languages: English, Franรงais, Espaรฑol, Deutsch, Italiano, Portuguรชs
  • Per-page collapsible results with source badges (text layer / OCR n% / no text) and per-page copy
  • Search the extracted text with live highlighting and match counts
  • Processing modal with live page preview + animated scan line during OCR, progress, ETA and cancel
  • Export: copy all, download .txt or .md (with page headings)
  • Share modal: native share sheet, X/Twitter, LinkedIn, WhatsApp, Facebook, email
  • Offline-capable PWA: installable, service worker caches the app and libraries after first visit
  • OCR engine is lazy-loaded โ€” the ~2 MB Tesseract library is only fetched if a page actually needs OCR
  • Dark/light theme follows your system ยท keyboard accessible ยท respects prefers-reduced-motion

๐Ÿ”’ Privacy

Your files never leave your device. All parsing and OCR run locally in the browser โ€” no upload, no server, no tracking. Internet is only needed on first load to fetch the pdf.js/Tesseract libraries and OCR language data from CDN (cached afterwards).

๐Ÿš€ Usage

Online: open the live demo.

Locally: clone the repo and open index.html in any modern browser โ€” that's it. No build step, no dependencies to install.

git clone https://github.com/Bros-AI/pdf-text-extractor.git
start pdf-text-extractor/index.html   # Windows (or just double-click it)

๐Ÿ›  How it works

  1. The PDF is opened with pdf.js and each page's embedded text layer is extracted, reconstructing line breaks from glyph positions.
  2. In Auto mode, any page yielding fewer than ~30 characters is considered a scan: it's rendered to a canvas scaled to ~2400 px on its longest side, then recognized by a reusable Tesseract.js worker in the selected language(s).
  3. Whichever result is richer wins, and the page is tagged with its source (and OCR confidence when applicable).

๐Ÿ“„ License

MIT โ€” ยฉ Bros.AI

About

๐Ÿ“„ Extract all text from any PDF in your browser โ€” pdf.js text layer + Tesseract.js OCR fallback. 100% client-side, free & private.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages