OcrConfiguration

data class OcrConfiguration(var languages: List<String>? = null, var outputFormats: EnumSet<ScanFlowConfiguration.OcrOutputFormat> = OcrOutputFormat.ALL) : Serializable

Languages and output formats for text recognition. Assign this to ocrConfiguration to enable OCR output. Provide at least one supported language in languages.

Constructors

Link copied to clipboard
constructor(languages: List<String>? = null, outputFormats: EnumSet<ScanFlowConfiguration.OcrOutputFormat> = OcrOutputFormat.ALL)

Properties

Link copied to clipboard

The BCP47 language tags to recognize, such as en-US or fr-FR. Defaults to null; set a nonempty list before using this configuration. Use com.geniusscansdk.ocr.OcrLanguage.getAllLanguages to find supported tags. Text recognition takes longer when multiple languages are specified.

Link copied to clipboard

The formats in which the OCR result is made available in the ScanFlow result. Defaults to OcrOutputFormat.ALL. OcrOutputFormat.TEXT_LAYER_IN_PDF only applies when multiPageFormat is MultiPageFormat.PDF.