|
@@ -824,14 +824,17 @@ namespace PDF_Master
|
|
|
string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
|
CPDFConverter.Init(resPath);
|
|
|
LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
|
|
|
+ //初始化ocr库
|
|
|
CPDFConverter.InitOcrLibrary(Path.Combine(resPath, "x64"));
|
|
|
- CPDFConverter.SetOCRModelPath(Path.Combine(resPath, "source"));
|
|
|
+ //初始化资源
|
|
|
+ CPDFConverter.SetOCRModelPath(Path.Combine(resPath, "source", "models"));
|
|
|
if (licenseerror != LicenseError.ERR_SUCCESS)
|
|
|
{
|
|
|
//MessageBox.Show("ComPDFKit Conversion SDK Load Failed!");
|
|
|
Console.WriteLine("CPDFConvert Load Failed.\n");
|
|
|
return false;
|
|
|
}
|
|
|
+ //之前1.7.0逻辑
|
|
|
//CPDFConverter.Init(resPath);
|
|
|
//CPDFConverter.SetOCRModelFolder(modelFolderPath);
|
|
|
}
|