c# - How to solve 'COMException not be controlled' caused by MODI (OCR reader) -


i'm trying read image modi (using c#), followed many of links found on internet.

as can solve problem "comexception not controlled" running following code:

public string reconeixnom(string filepath)     {         string nom;          document md = new document(); //crea document modi.document         md.create(filepath); //document amb la ruta que toca.         md.ocr(milanguages.milang_spanish, false, false);         modi.image image = (modi.image)md.images[0];         nom = image.layout.text;          image = null;         md.close(false);         md = null;          gc.collect();         gc.waitforpendingfinalizers();          return nom;     } 

i tried submit block in try-cach capturing exception

'system.runtime.interopservices.comexception'

but remains same.

i have tried debug program, have found exception spear following line:

md.ocr(milanguages.milang_spanish, false, false); 

please, know can happening?


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -