public Object Prepare( OcrEngine engine, OcrDocument doc )
Public Function Prepare ( engine As OcrEngine, doc As OcrDocument ) As Object
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.