Click or drag to resize

IForeignTranslatorPrepare Method

Prepare a foreign translator for translation.

Namespace:  Atalasoft.Ocr
Assembly:  Atalasoft.dotImage.Ocr (in Atalasoft.dotImage.Ocr.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
Object Prepare(
	OcrEngine engine,
	OcrDocument doc
)

Parameters

engine
Type: Atalasoft.OcrOcrEngine
The engine that will perform the recognition.
doc
Type: Atalasoft.OcrOcrDocument
The document that will be populated by the engine.

Return Value

Type: Object
An object that will be used specifically by the foreign translator for document translation.
Remarks

This method is provided for two purposes. The first is to establish a translator-specific object to maintain state information about the current translator session. The second is to populate the OcrDocument object with metadata or infrastructure for metadata.

During translation, OcrEngine will construct an empty OcrDocument and pass both itself and the document to the foreign translator through Prepare. Then the engine will attempt to recognize pages, then the foreign translator will translate the OcrDocument into final form. If an error occurs, the foreign translator is always given an opportunity to clean up via the Finish(OcrEngine, OcrDocument, Boolean, Object) method.

See Also