Getting recognition results as text

Contents
[ ]

Recognition results in plain text with line breaks are returned from AsposeOCRSerializeResult() method. This method takes the recognition result returned from recognition function and Module.ExportFormat.text (0) value.

var input = Module.WasmAsposeOCRInput();
var inputs = new Module.WasmAsposeOCRInputs();
input.url = filename;
inputs.push_back(input);
// Recognize
var settings = Module.WasmAsposeOCRRecognitionSettings();
settings.language_alphabet = Module.Language.DEU;
var result = Module.AsposeOCRRecognize(inputs, settings);
// Get recognition results as text
var result_str = Module.AsposeOCRSerializeResult(result, Module.ExportFormat.text);
console.log(result_str);