|
|
@ -81,7 +81,9 @@ public class OcrTaskServiceImpl implements OcrTaskService { |
|
|
|
param.put(Constants.PDF_FILE_NUM, pagenum); |
|
|
|
String resStr = DownLoadUtil.doPostFrom(url, param); |
|
|
|
JSONObject res = JSONObject.parseObject(resStr); |
|
|
|
maxpagenum = (int) res.get(Constants.PDF_FILE_SIZE); |
|
|
|
if(res.containsKey(Constants.PDF_FILE_SIZE)) { |
|
|
|
maxpagenum = (int) res.get(Constants.PDF_FILE_SIZE); |
|
|
|
} |
|
|
|
List<Map<String, Object>> wordsResult = (List<Map<String, Object>>) res.get(Constants.WORDS_RESULT); |
|
|
|
for (Map<String, Object> map : wordsResult) { |
|
|
|
content.append(map.get(Constants.WORDS)); |
|
|
|