Skills

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.

<!-- AI-RULEZ :: GENERATED FILE, DO NOT EDIT Content-Hash: blake3:b1718303d659167ff376b4e1d4baf546d3e74f8f0804698a3486c0a1d2e6c913 Source-Hash: blake3:4a90223a333b0f963ae8cdec4f38db88b769132c5dd1b7f39a7fe8e84f57f83e Schema-Version: v1 -->

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 content field, 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:

Read the whole SKILL.md on GitHub

More in Engineering