|
|
|
@ -17,7 +17,6 @@ import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
|
public class PDFExtractionUtil {
|
|
|
|
|
public static List<Extraction> extract(String pdfPath, List<DataObject> extractStngs) {
|
|
|
|
|
Print printUtil = new Print();
|
|
|
|
|
|
|
|
|
|
List<Extraction> extractList = new ArrayList<Extraction>();
|
|
|
|
|
|
|
|
|
@ -51,10 +50,10 @@ public class PDFExtractionUtil {
|
|
|
|
|
|
|
|
|
|
for(DataObject extractStng : extractStngs) {
|
|
|
|
|
|
|
|
|
|
float x = printUtil.mmToPt(extractStng.number("LEFT_PSTN").floatValue());
|
|
|
|
|
float y = printUtil.mmToPt(extractStng.number("TOP_PSTN").floatValue());
|
|
|
|
|
float w = printUtil.mmToPt(extractStng.number("WIDTH_SZ").floatValue());
|
|
|
|
|
float h = printUtil.mmToPt(extractStng.number("HEIGHT_SZ").floatValue());
|
|
|
|
|
float x = Print.mmToPt(extractStng.number("LEFT_PSTN").floatValue());
|
|
|
|
|
float y = Print.mmToPt(extractStng.number("TOP_PSTN").floatValue());
|
|
|
|
|
float w = Print.mmToPt(extractStng.number("WIDTH_SZ").floatValue());
|
|
|
|
|
float h = Print.mmToPt(extractStng.number("HEIGHT_SZ").floatValue());
|
|
|
|
|
|
|
|
|
|
String text0 = ExtractText.getExtractByStng(pdDocument, pageIndex+1, x, y, w, h);
|
|
|
|
|
textItem.put(extractStng.string("EXTR_ARTCL_NM"), text0);
|
|
|
|
|