API Reference tesseract_js v#0.1.0

Copy Markdown View Source

Modules

Phoenix-friendly wrapper for tesseract.js.

HEEx components that wire tesseract_js into a Phoenix layout.

Reads :tesseract_js Application config with sensible defaults and resolves the paths the browser needs (workerPath, corePath, langPath) for either CDN or local mode.

Model registry — single source of truth for the languages and core WASM files that tesseract_js knows about. Both CDN mode and local mode are driven from this module.

Mix Tasks

Downloads the tesseract.js core WASM bundle and one or more traineddata language files into your app's priv/static/assets/vendor/tesseract/, so you can run tesseract_js in local mode (no jsDelivr at runtime).

Copies the package's bundled JS files (tesseract.min.js, worker.min.js, tesseract_js.umd.js) into your app's priv/static/assets/vendor/tesseract/, so Phoenix's static plug can serve them at the paths the HEEx components emit.