|
@@ -5262,11 +5262,10 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
|
|
|
@Override
|
|
|
@Async
|
|
|
- public boolean atuoOCR(String ids) throws Exception {
|
|
|
- String url="/mnt/sdc/AutoPdf/";
|
|
|
- //String url="D:\\AutoPdf\\";
|
|
|
- List<Long> idsList = Func.toLongList(ids);
|
|
|
- List<ArchivesAuto> archivesAutoList = this.list(new LambdaQueryWrapper<ArchivesAuto>().in(ArchivesAuto::getId, idsList));
|
|
|
+ public boolean atuoOCR(List<String> ids) throws Exception {
|
|
|
+ //String url="/mnt/sdc/AutoPdf/";
|
|
|
+ String url="D:\\AutoPdf\\";
|
|
|
+ List<ArchivesAuto> archivesAutoList = this.list(new LambdaQueryWrapper<ArchivesAuto>().in(ArchivesAuto::getId, ids));
|
|
|
for (ArchivesAuto auto : archivesAutoList) {
|
|
|
String fileUrl=auto.getOutUrl().substring(0,auto.getOutUrl().indexOf("@"));
|
|
|
String filePath=url+auto.getName()+".pdf";
|
|
@@ -5332,11 +5331,11 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
}
|
|
|
|
|
|
public List<String> extractTextFromPDF(String pdfFilePath) throws IOException, InterruptedException {
|
|
|
-// String PYTHON_SCRIPT_PATH = "C:\\Users\\hc01\\AppData\\Local\\Programs\\Python\\Python310\\Python\\pdfTextExtractorWindows.py";
|
|
|
-// String PYTHON_INTERPRETER = "C:\\Users\\hc01\\AppData\\Local\\Programs\\Python\\Python310\\python.exe";
|
|
|
+ String PYTHON_SCRIPT_PATH = "C:\\Users\\hc01\\AppData\\Local\\Programs\\Python\\Python310\\Python\\pdfTextExtractorWindows.py";
|
|
|
+ String PYTHON_INTERPRETER = "C:\\Users\\hc01\\AppData\\Local\\Programs\\Python\\Python310\\python.exe";
|
|
|
|
|
|
- String PYTHON_SCRIPT_PATH = "/www/wwwlogs/python/pdfTextExtractorWindows.py";
|
|
|
- String PYTHON_INTERPRETER = "python3";
|
|
|
+ //String PYTHON_SCRIPT_PATH = "/www/wwwlogs/python/pdfTextExtractorWindows.py";
|
|
|
+ //String PYTHON_INTERPRETER = "python3";
|
|
|
String[] command = {
|
|
|
PYTHON_INTERPRETER,
|
|
|
PYTHON_SCRIPT_PATH,
|