解决maven build报错
This commit is contained in:
@@ -3,10 +3,9 @@ package org.jeecg.modules.system.controller;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sourceforge.tess4j.Tesseract;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.Loader;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
import org.apache.pdfbox.text.PDFTextStripper;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
@@ -250,7 +249,7 @@ public class CommonController {
|
||||
private Map<String, String> extractExperimentFile(MultipartFile file) throws Exception {
|
||||
Map<String, String> allFileResult = new HashMap<>();
|
||||
String fullText = "";
|
||||
try (PDDocument document = PDDocument.load(file.getInputStream())) {
|
||||
try (PDDocument document = Loader.loadPDF(file.getInputStream().readAllBytes())) {
|
||||
PDFTextStripper stripper = new PDFTextStripper();
|
||||
fullText = stripper.getText(document);
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user