Click or drag to resize

JsonTranslatorPrepare Method

Prepare a foreign translator for translation.

Namespace:  Atalasoft.Imaging.WebControls.OCR
Assembly:  Atalasoft.dotImage.WebControls (in Atalasoft.dotImage.WebControls.dll) Version: (.NET 4.5.2, x86)
public Object Prepare(
	OcrEngine engine,
	OcrDocument doc


Type: Atalasoft.OcrOcrEngine
The engine that will perform the recognition.
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.


IForeignTranslatorPrepare(OcrEngine, OcrDocument)

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