我现在的问题是,我重新建立一个TL测试项目,
把上次原来旧的TL测试代码拷贝过来,之前都能跑的,而且OCR都正确,
现在却卡在这句
RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY);
开始报错是找不到文件,
我改名LEADTOOLS.LIC后,还是找不到,
后来我把D:\LEADTOOLS 19\Common\License下的lic两个文件,
都拷贝到新测试项目的debug目录下,
现在报另外一个错,"Invalid runtime license",
怎么解决哇?
这是我的代码,
public Image ddd;
private IOcrEngine _ocrEngine;
private IOcrDocument _ocrDocument;
public Form1()
{
InitializeComponent();
ddd = new Bitmap(56, 82);
string MY_LICENSE_FILE = @"C:\Users\guohong\Documents\Visual Studio 2015\Projects\test1\test1\bin\x64\Debug\LEADTOOLS.lic";
string MY_DEVELOPER_KEY = @"gcwdXp1TiJacbVTDENE/k4CRDcAcLmcIu9383qJpsjPpoJHYamOd13qYkXqpCmFEbJzAcui
aaiSCpOJGp+HPlx4jGaEmn0ru";
RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY); //现在用的是评估许可eval-license
//初始化OCR引擎
_ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false); //英文版是Advatage,后面要改成Professor版
//启动OCR引擎
_ocrEngine.Startup(null, null, null, @"D:\LEADTOOLS 19\Bin\Common\OcrAdvantageRuntime"); //英文版是Advatage,后面要改成Professor版
//创建文档
// _ocrDocument = _ocrEngine.DocumentManager.CreateDocument();
}
就卡在RasterSupport.SetLicens这句了 |