|
|
@ -12,13 +12,13 @@ import org.apache.pdfbox.pdmodel.PDPageTree;
|
|
|
|
|
|
|
|
|
|
|
|
public class PDFUtil {
|
|
|
|
public class PDFUtil {
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Extraction> extract(String pdfName) {
|
|
|
|
public static List<Extraction> extract(String pdfPath, String templateId) {
|
|
|
|
|
|
|
|
|
|
|
|
List<Extraction> extractList = new ArrayList<Extraction>();
|
|
|
|
List<Extraction> extractList = new ArrayList<Extraction>();
|
|
|
|
|
|
|
|
|
|
|
|
File file = null;
|
|
|
|
File file = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
file = new File(pdfName);
|
|
|
|
file = new File(pdfPath);
|
|
|
|
} catch (Exception e2) {
|
|
|
|
} catch (Exception e2) {
|
|
|
|
e2.printStackTrace();
|
|
|
|
e2.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -42,6 +42,7 @@ public class PDFUtil {
|
|
|
|
extraction = new Extraction();
|
|
|
|
extraction = new Extraction();
|
|
|
|
extraction.setPage(pageIndex+1);
|
|
|
|
extraction.setPage(pageIndex+1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//설정 = mapper.get설정(query.setSggCd().setTemplateId(templateId));
|
|
|
|
String epayNo = ExtractText.getExtractByStng(pdDocument, pageIndex+1, 0, 0, 100, 100);
|
|
|
|
String epayNo = ExtractText.getExtractByStng(pdDocument, pageIndex+1, 0, 0, 100, 100);
|
|
|
|
|
|
|
|
|
|
|
|
extraction.setEpayNo(epayNo);
|
|
|
|
extraction.setEpayNo(epayNo);
|
|
|
|