소스 정리

main
이범준 8 months ago
parent ef53bce06b
commit 33ed6a25c4

@ -707,7 +707,7 @@ public class PDFWriter {
float partHeight;
if(foldCode.equals("01")) {
if(paper.A4.equals(paper)) {
if(PDRectangle.A4.equals(paper)) {
partHeight = 99;
} else {
partHeight = 93;

@ -184,7 +184,7 @@ public class InsertingImageCell {
hdr.getExplanation().setBytes(null);
}
private int fromMM(int mm) {
public int fromMM(int mm) {
if (mm == 0) {
return 1;
}

@ -110,11 +110,4 @@ public class ExtractImageEngine extends PDFStreamEngine {
}
}
/**
* This will print the usage for this document.
*/
private static void usage()
{
System.err.println( "Usage: java " + ExtractImageEngine.class.getName() + " <input-pdf>" );
}
}

@ -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);

@ -73,17 +73,17 @@ abstract public class LayoutParser {
}
Map<String, List<CommonCode>> allCode = new HashMap<String, List<CommonCode>>(){{
put("PHOTO_TYPE",new ArrayList<>() {{
put("PHOTO_TYPE",new ArrayList<CommonCode>() {{
add(new CommonCode() {{ setCode("1"); setValue("입차사진"); }});
add(new CommonCode() {{ setCode("2"); setValue("주차사진"); }});
add(new CommonCode() {{ setCode("3"); setValue("위반사진"); }});
add(new CommonCode() {{ setCode("4"); setValue("출차사진"); }});
}});
put("FILE_STATUS",new ArrayList<>() {{
put("FILE_STATUS",new ArrayList<CommonCode>() {{
add(new CommonCode() {{ setCode("S"); setValue("정상등록자료"); }});
add(new CommonCode() {{ setCode("E"); setValue("삭제자료"); }});
}});
put("CRDN_CN",new ArrayList<>() {{
put("CRDN_CN",new ArrayList<CommonCode>() {{
add(new CommonCode() {{ setCode("00"); setValue("사용안함"); }});
add(new CommonCode() {{ setCode("01"); setValue("일반차량(전기차)"); }});
add(new CommonCode() {{ setCode("02"); setValue("장기주차(전기차)"); }});

@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.test.context.ContextConfiguration;
import cokr.xit.base.boot.XitBaseTest;
import cokr.xit.fims.FimsApplication;
@ContextConfiguration(classes = FimsApplication.class)
class FimsApplicationTests extends XitBaseTest {

Loading…
Cancel
Save