|
|
|
|
@ -19,6 +19,7 @@ import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
|
|
|
|
|
import org.egovframe.rte.fdl.string.EgovStringUtil;
|
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.applib.HttpStatusCodeException;
|
|
|
|
|
import cokr.xit.applib.Print;
|
|
|
|
|
import cokr.xit.fims.cmmn.CmmnUtil;
|
|
|
|
|
import cokr.xit.fims.cmmn.FimsPrintOption;
|
|
|
|
|
@ -323,6 +324,19 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
|
if(!imageFile.exists()) {
|
|
|
|
|
if(otptArtclNm.equals("offcs")) {
|
|
|
|
|
throw new HttpStatusCodeException(500, "{\"failed\":true,\"description\":\"직인 파일을 찾을 수 없습니다.\"}", true);
|
|
|
|
|
}
|
|
|
|
|
if(otptArtclNm.equals("background")) {
|
|
|
|
|
throw new HttpStatusCodeException(500, "{\"failed\":true,\"description\":\"배경이미지 파일을 찾을 수 없습니다.\"}", true);
|
|
|
|
|
}
|
|
|
|
|
if(otptArtclNm.equals("postSenderLogo")) {
|
|
|
|
|
throw new HttpStatusCodeException(500, "{\"failed\":true,\"description\":\"우편물 송신자 로고 파일을 찾을 수 없습니다.\"}", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
InputStream is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
|
|
String imageKey = "";
|
|
|
|
|
@ -459,6 +473,8 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
} catch(FileNotFoundException e) {
|
|
|
|
|
|
|
|
|
|
throw new RuntimeException("파일을 찾을 수 없습니다.");
|
|
|
|
|
} catch(HttpStatusCodeException e) {
|
|
|
|
|
throw e;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException("출력오류."+e);
|
|
|
|
|
}
|
|
|
|
|
|