Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/tesseract/mod.ts>TesseractOptions

Deno wrapper for Tesseract OCR engine CLI.
Latest
interface TesseractOptions
import { type TesseractOptions } from "https://deno.land/x/tesseract@1.0.1/mod.ts";

Various options to configure Tesseract

Properties

optional
lang: string

Language

optional
path: string

Tesseract Path

optional
tessdata: string

Tessdata directory path

optional
psm: number | PSM

Page Segmentation Mode

optional
oem: number | OEM

OCR Engine Mode

optional
dpi: number

DPI (Resolution) for Image

optional
words: string

Path to user_words file

optional
patterns: string

Path to user_patterns file

optional
flags: { [name: string]: string; }

Custom flags to pass on with Tesseract Command

optional
config: { [name: string]: string; }

-c flags to pass

optional
output: "stdout" | "-" | string

Output file path or "stdout" or "-"

optional
stdin: boolean

Whether file should be written into Stdin or read from path