diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java index 759ddc9e..5f88dc40 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java @@ -332,6 +332,7 @@ public abstract class PDFPrintFormat { mosSet = this.getMosSet(imageKey, dataObject); } this.insertImage(writer, is, pstn, size); + is.close(); if(otptArtclNm.equals("rprsCrdnPhoto") && !imageKey.equals("") && mosSet != null) { @@ -341,6 +342,7 @@ public abstract class PDFPrintFormat { List transformedMosaicInfos = MediaUtil.getTransformedMosaic( mosSet, is0, new PstnAndSize(pstn[0],pstn[1], size[0], size[1]) ); + is0.close(); for(int k=0; k < transformedMosaicInfos.size(); k++) { PstnAndSize mosaicInfo = transformedMosaicInfos.get(k); @@ -348,6 +350,7 @@ public abstract class PDFPrintFormat { InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream(); this.insertImage(writer, blackImageStream, mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float()); + blackImageStream.close(); } } @@ -401,7 +404,7 @@ public abstract class PDFPrintFormat { this.insertImage(writer, is, devideInfo.getPstn().to2Float(), devideInfo.getSize().to2Float()); - + is.close(); if(otptArtclNm.equals("crdnPhoto") && !imageKeys.isEmpty() && !mosSets.isEmpty()) { @@ -414,12 +417,14 @@ public abstract class PDFPrintFormat { List transformedMosaicInfos = MediaUtil.getTransformedMosaic( mosSets.get(i), is0, devideInfo ); + is0.close(); for(int k=0; k < transformedMosaicInfos.size(); k++) { PstnAndSize mosaicInfo = transformedMosaicInfos.get(k); InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream(); this.insertImage(writer, blackImageStream, mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float()); + blackImageStream.close(); } } @@ -452,6 +457,9 @@ public abstract class PDFPrintFormat { result.put("dataNames", this.filterDownloadDataNames()); } catch(FileNotFoundException e) { + System.out.println("kkkkkk"); + System.out.println(e); + throw new RuntimeException("파일을 찾을 수 없습니다."); } catch (Exception e) { throw new RuntimeException("출력오류."+e);