
Xberg Extracting With Ocr
Use when extracting text from scanned PDFs, photographed pages, or images that have no...
Install
npx skills add xberg-io/xberg --skill xberg-extracting-with-ocr -g -a claude-code -y- Repository
- xberg-io/xberg9.5k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,282 tokens
- Runs scripts
- No, instructions only
What it does
Use when extracting text from scanned PDFs, photographed pages, or images that have no embedded text layer. Covers OCR backends, language packs, force-OCR, and performance tuning.
Extracting with OCR
Use this when a document is image-based: scanned PDFs, photographed pages, screenshots, JPEG/PNG/TIFF with text. Xberg auto-OCRs raster images and auto-detects PDFs that lack a text layer. Force it on when extraction returned empty/garbled text from a PDF that "looks" textual.
When to force OCR
- Extraction returned an empty
contentfield, but the file opens visually. - The PDF text layer is junk (copy-paste from a viewer produces gibberish).
- You want consistent output across mixed scanned + digital PDFs.
xberg extract scan.pdf --force-ocr=true
xberg extract scan.pdf --ocr=true --ocr-language eng
If a page has an unreliable text layer, --force-ocr=true re-rasterizes
and runs OCR on every page.
Backends
Tesseract is the default and ships with the CLI, no extra install. Other backends are opt-in:
