|
|
@ -13,13 +13,9 @@ import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
|
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.PDPage;
|
|
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.PDPageContentStream;
|
|
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.common.PDRectangle;
|
|
|
|
import org.apache.pdfbox.pdmodel.common.PDRectangle;
|
|
|
|
import org.apache.pdfbox.pdmodel.font.PDType0Font;
|
|
|
|
import org.apache.pdfbox.pdmodel.font.PDType0Font;
|
|
|
|
import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
|
|
|
|
import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
|
|
|
|
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
|
|
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
|
|
|
|
import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
|
|
|
|
import org.egovframe.rte.fdl.string.EgovStringUtil;
|
|
|
|
import org.egovframe.rte.fdl.string.EgovStringUtil;
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
@ -33,6 +29,7 @@ import cokr.xit.fims.cmmn.Size;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.DefaultOtptArtclStng;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.DefaultOtptArtclStng;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.PDFColors;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.PDFColors;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.PDFCoordinate;
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.PDFCoordinate;
|
|
|
|
|
|
|
|
import cokr.xit.fims.cmmn.pdf.print.PDFWriter;
|
|
|
|
import cokr.xit.fims.sprt.MediaUtil;
|
|
|
|
import cokr.xit.fims.sprt.MediaUtil;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
|
|
@ -232,20 +229,20 @@ public abstract class PDFPrintFormat {
|
|
|
|
public Map<String, Object> makePdfFile(List<DataObject> dataObjectList) {
|
|
|
|
public Map<String, Object> makePdfFile(List<DataObject> dataObjectList) {
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PDFWriter writer = new PDFWriter();
|
|
|
|
|
|
|
|
|
|
|
|
String resultFilePath = this.filePathForNewFile();
|
|
|
|
String resultFilePath = this.filePathForNewFile();
|
|
|
|
PDDocument doc = new PDDocument();//pdf문서 생성
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//폰트 로드
|
|
|
|
//폰트 로드
|
|
|
|
Map<String, PDType0Font> fontMap = this.getFontMap(doc);
|
|
|
|
Map<String, PDType0Font> fontMap = this.getFontMap(writer);
|
|
|
|
|
|
|
|
|
|
|
|
//용지 크기 설정
|
|
|
|
//용지 크기 설정
|
|
|
|
PDRectangle paper = null;
|
|
|
|
//PDRectangle paper = null;
|
|
|
|
if(this.paperSeCd.equals("01")) {
|
|
|
|
if(this.paperSeCd.equals("01")) {
|
|
|
|
paper = PDRectangle.A4;
|
|
|
|
writer.paper("A4");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
paper = PDRectangle.LETTER;
|
|
|
|
writer.paper("LETTER");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -279,14 +276,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for(DataObject dataObject : dataObjectList) {
|
|
|
|
for(DataObject dataObject : dataObjectList) {
|
|
|
|
//페이지생성(건별)
|
|
|
|
writer.beginPage();
|
|
|
|
PDPage blankPage = new PDPage(paper);
|
|
|
|
|
|
|
|
doc.addPage(blankPage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 작업 페이지 설정
|
|
|
|
|
|
|
|
PDPage page = doc.getPage(doc.getNumberOfPages()-1);
|
|
|
|
|
|
|
|
// 컨텐츠 스트림 열기
|
|
|
|
|
|
|
|
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean completeFoldLine = false;
|
|
|
|
boolean completeFoldLine = false;
|
|
|
|
|
|
|
|
|
|
|
@ -296,7 +286,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
if(!otptArtclNm.equals("background") && !completeFoldLine) {
|
|
|
|
if(!otptArtclNm.equals("background") && !completeFoldLine) {
|
|
|
|
//접는곳 점선 그리기
|
|
|
|
//접는곳 점선 그리기
|
|
|
|
if(!otptBscStng.string("FOLD_LINE_PSTN_SE_CD").equals("")) {
|
|
|
|
if(!otptBscStng.string("FOLD_LINE_PSTN_SE_CD").equals("")) {
|
|
|
|
this.renderFoldLine(contentStream, paper, otptBscStng.string("FOLD_LINE_PSTN_SE_CD"));
|
|
|
|
this.renderFoldLine(writer, otptBscStng.string("FOLD_LINE_PSTN_SE_CD"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
completeFoldLine = true;
|
|
|
|
completeFoldLine = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -320,7 +310,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
String textValue = this.getMappingValue(otptArtclNm,defaultValue,forPost,dataObject,printOption, this.print);
|
|
|
|
String textValue = this.getMappingValue(otptArtclNm,defaultValue,forPost,dataObject,printOption, this.print);
|
|
|
|
|
|
|
|
|
|
|
|
this.writeText(contentStream, textValue, pstn, size[0], align, lineChgYn
|
|
|
|
this.writeText(writer, textValue, pstn, size[0], align, lineChgYn
|
|
|
|
, font, fontSz, fontStyle, fontColor);
|
|
|
|
, font, fontSz, fontStyle, fontColor);
|
|
|
|
|
|
|
|
|
|
|
|
} else if(prototypeStng.getComponentType().equals("image")) {
|
|
|
|
} else if(prototypeStng.getComponentType().equals("image")) {
|
|
|
@ -344,7 +334,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
imageKey = this.getMappingValue(otptArtclNm+"Key",defaultValue,forPost,dataObject,printOption,this.print);
|
|
|
|
imageKey = this.getMappingValue(otptArtclNm+"Key",defaultValue,forPost,dataObject,printOption,this.print);
|
|
|
|
mosSet = this.getMosSet(imageKey, dataObject);
|
|
|
|
mosSet = this.getMosSet(imageKey, dataObject);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.insertImage(doc, contentStream, is, pstn, size);
|
|
|
|
this.insertImage(writer, is, pstn, size);
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto") && !imageKey.equals("") && mosSet != null) {
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto") && !imageKey.equals("") && mosSet != null) {
|
|
|
|
|
|
|
|
|
|
|
@ -359,7 +349,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
PstnAndSize mosaicInfo = transformedMosaicInfos.get(k);
|
|
|
|
PstnAndSize mosaicInfo = transformedMosaicInfos.get(k);
|
|
|
|
|
|
|
|
|
|
|
|
InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream();
|
|
|
|
InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream();
|
|
|
|
this.insertImage(doc, contentStream, blackImageStream,
|
|
|
|
this.insertImage(writer, blackImageStream,
|
|
|
|
mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float());
|
|
|
|
mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -412,7 +402,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
InputStream is = new FileInputStream(imageFile);
|
|
|
|
InputStream is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
|
|
|
|
this.insertImage(doc, contentStream, is,
|
|
|
|
this.insertImage(writer, is,
|
|
|
|
devideInfo.getPstn().to2Float(), devideInfo.getSize().to2Float());
|
|
|
|
devideInfo.getPstn().to2Float(), devideInfo.getSize().to2Float());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -431,7 +421,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
for(int k=0; k < transformedMosaicInfos.size(); k++) {
|
|
|
|
for(int k=0; k < transformedMosaicInfos.size(); k++) {
|
|
|
|
PstnAndSize mosaicInfo = transformedMosaicInfos.get(k);
|
|
|
|
PstnAndSize mosaicInfo = transformedMosaicInfos.get(k);
|
|
|
|
InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream();
|
|
|
|
InputStream blackImageStream = new ClassPathResource("samplefiles/black.png").getInputStream();
|
|
|
|
this.insertImage(doc, contentStream, blackImageStream,
|
|
|
|
this.insertImage(writer, blackImageStream,
|
|
|
|
mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float());
|
|
|
|
mosaicInfo.getPstn().to2Float(), mosaicInfo.getSize().to2Float());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -450,17 +440,17 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
if(!completeFoldLine) {
|
|
|
|
if(!completeFoldLine) {
|
|
|
|
if(!otptBscStng.string("FOLD_LINE_PSTN_SE_CD").equals("")) {
|
|
|
|
if(!otptBscStng.string("FOLD_LINE_PSTN_SE_CD").equals("")) {
|
|
|
|
this.renderFoldLine(contentStream, paper, otptBscStng.string("FOLD_LINE_PSTN_SE_CD"));
|
|
|
|
this.renderFoldLine(writer, otptBscStng.string("FOLD_LINE_PSTN_SE_CD"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contentStream.close();
|
|
|
|
writer.endPage();
|
|
|
|
|
|
|
|
|
|
|
|
} //출력자료건수 loop 끝
|
|
|
|
} //출력자료건수 loop 끝
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc.save(resultFilePath);
|
|
|
|
writer.saveDocument(resultFilePath);
|
|
|
|
doc.close();
|
|
|
|
writer.closeDocument();
|
|
|
|
|
|
|
|
|
|
|
|
String downloadFileName = this.print.getFormatKorName()+"_"+this.print.getPrintRequestDt()+".pdf";
|
|
|
|
String downloadFileName = this.print.getFormatKorName()+"_"+this.print.getPrintRequestDt()+".pdf";
|
|
|
|
result.put("filename", downloadFileName);
|
|
|
|
result.put("filename", downloadFileName);
|
|
|
@ -524,7 +514,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 텍스트를 pdf에 입력한다.
|
|
|
|
* 텍스트를 pdf에 입력한다.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void writeText(PDPageContentStream contentStream, String allText,
|
|
|
|
public void writeText(PDFWriter writer, String allText,
|
|
|
|
float[] XYmm, float textAreaWidth_mm, String align, String newLineYn,
|
|
|
|
float[] XYmm, float textAreaWidth_mm, String align, String newLineYn,
|
|
|
|
PDType0Font font, int fontSize, RenderingMode fontStyle, PDColor fontColor) {
|
|
|
|
PDType0Font font, int fontSize, RenderingMode fontStyle, PDColor fontColor) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -557,10 +547,10 @@ public abstract class PDFPrintFormat {
|
|
|
|
String firstLine = textArr[0];
|
|
|
|
String firstLine = textArr[0];
|
|
|
|
float firstLineWidth = calcTextWidth(font, fontSize, firstLine);
|
|
|
|
float firstLineWidth = calcTextWidth(font, fontSize, firstLine);
|
|
|
|
|
|
|
|
|
|
|
|
contentStream.beginText();
|
|
|
|
writer.beginText();
|
|
|
|
contentStream.setFont(font, fontSize);
|
|
|
|
writer.setFont(font, fontSize);
|
|
|
|
contentStream.setRenderingMode(fontStyle);
|
|
|
|
writer.setRenderingMode(fontStyle);
|
|
|
|
contentStream.setNonStrokingColor(fontColor);
|
|
|
|
writer.setNonStrokingColor(fontColor);
|
|
|
|
|
|
|
|
|
|
|
|
float resultY = xyAbsolute[1] - fontSize;
|
|
|
|
float resultY = xyAbsolute[1] - fontSize;
|
|
|
|
|
|
|
|
|
|
|
@ -573,8 +563,8 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
float resultX = xyAbsolute[0] + firstLineAlignCorrection;
|
|
|
|
float resultX = xyAbsolute[0] + firstLineAlignCorrection;
|
|
|
|
|
|
|
|
|
|
|
|
contentStream.newLineAtOffset(resultX, resultY);
|
|
|
|
writer.newLineAtOffset(resultX, resultY);
|
|
|
|
contentStream.showText(textArr[0]);
|
|
|
|
writer.showText(textArr[0]);
|
|
|
|
|
|
|
|
|
|
|
|
if(textArr.length > 1) {
|
|
|
|
if(textArr.length > 1) {
|
|
|
|
float beforeLineWidth = firstLineWidth;
|
|
|
|
float beforeLineWidth = firstLineWidth;
|
|
|
@ -590,8 +580,8 @@ public abstract class PDFPrintFormat {
|
|
|
|
alignCorrection = (beforeLineWidth - thisLineWidth)/2.0f;
|
|
|
|
alignCorrection = (beforeLineWidth - thisLineWidth)/2.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contentStream.newLineAtOffset(alignCorrection, -(fontSize + 1));
|
|
|
|
writer.newLineAtOffset(alignCorrection, -(fontSize + 1));
|
|
|
|
contentStream.showText(thisLine);
|
|
|
|
writer.showText(thisLine);
|
|
|
|
|
|
|
|
|
|
|
|
beforeLineWidth = thisLineWidth;
|
|
|
|
beforeLineWidth = thisLineWidth;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -599,7 +589,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contentStream.endText();
|
|
|
|
writer.endText();
|
|
|
|
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
@ -669,7 +659,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* pdf에 이미지를 삽입한다.
|
|
|
|
* pdf에 이미지를 삽입한다.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void insertImage(PDDocument doc, PDPageContentStream contentStream, InputStream imageStream, float[] XYmm,
|
|
|
|
public void insertImage(PDFWriter writer, InputStream imageStream, float[] XYmm,
|
|
|
|
float[] SIZEmm) {
|
|
|
|
float[] SIZEmm) {
|
|
|
|
|
|
|
|
|
|
|
|
float[] xyAbsolute = this.toPDFCoordinate(XYmm).absolute();
|
|
|
|
float[] xyAbsolute = this.toPDFCoordinate(XYmm).absolute();
|
|
|
@ -678,9 +668,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
CmmnUtil.mmToPt(SIZEmm[0]),CmmnUtil.mmToPt(SIZEmm[1])
|
|
|
|
CmmnUtil.mmToPt(SIZEmm[0]),CmmnUtil.mmToPt(SIZEmm[1])
|
|
|
|
};
|
|
|
|
};
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
writer.image(imageStream, xyAbsolute[0], xyAbsolute[1]-size[1], size[0], size[1]);
|
|
|
|
PDImageXObject image = PDImageXObject.createFromByteArray(doc, imageStream.readAllBytes(), "temp");
|
|
|
|
|
|
|
|
contentStream.drawImage(image, xyAbsolute[0], xyAbsolute[1]-size[1], size[0], size[1]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
@ -818,16 +806,16 @@ public abstract class PDFPrintFormat {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* pdf에 봉합선을 넣는다.
|
|
|
|
* pdf에 봉합선을 넣는다.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void renderFoldLine(PDPageContentStream contentStream, PDRectangle paper, String foldCode) {
|
|
|
|
public void renderFoldLine(PDFWriter writer, String foldCode) {
|
|
|
|
if(foldCode.equals("") && !foldCode.equals("01") && !foldCode.equals("02")) {
|
|
|
|
if(foldCode.equals("") && !foldCode.equals("01") && !foldCode.equals("02")) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float paperWidth = paper.getWidth();
|
|
|
|
float paperWidth = writer.getPaperSize().getWidth();
|
|
|
|
|
|
|
|
|
|
|
|
float partHeight;
|
|
|
|
float partHeight;
|
|
|
|
if(foldCode.equals("01")) {
|
|
|
|
if(foldCode.equals("01")) {
|
|
|
|
if(PDRectangle.A4.equals(paper)) {
|
|
|
|
if(PDRectangle.A4.equals(writer.getPaperSize())) {
|
|
|
|
partHeight = 99;
|
|
|
|
partHeight = 99;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
partHeight = 93;
|
|
|
|
partHeight = 93;
|
|
|
@ -848,14 +836,14 @@ public abstract class PDFPrintFormat {
|
|
|
|
float topFold_pt = CmmnUtil.mmToPt(topFold);
|
|
|
|
float topFold_pt = CmmnUtil.mmToPt(topFold);
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
contentStream.setLineDashPattern(new float[]{3,1}, 0);
|
|
|
|
writer.setLineDashPattern(new float[]{3,1}, 0);
|
|
|
|
contentStream.moveTo(0, topFold_pt);
|
|
|
|
writer.moveTo(0, topFold_pt);
|
|
|
|
contentStream.lineTo(paperWidth, topFold_pt);
|
|
|
|
writer.lineTo(paperWidth, topFold_pt);
|
|
|
|
contentStream.stroke();
|
|
|
|
writer.stroke();
|
|
|
|
contentStream.moveTo(0, bottomFold_pt);
|
|
|
|
writer.moveTo(0, bottomFold_pt);
|
|
|
|
contentStream.lineTo(paperWidth, bottomFold_pt);
|
|
|
|
writer.lineTo(paperWidth, bottomFold_pt);
|
|
|
|
contentStream.stroke();
|
|
|
|
writer.stroke();
|
|
|
|
contentStream.setLineDashPattern(new float[]{}, 0);
|
|
|
|
writer.setLineDashPattern(new float[]{}, 0);
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
|
throw new RuntimeException("PDF 파일 출력 중 오류가 발생하였습니다."+e);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -937,17 +925,18 @@ public abstract class PDFPrintFormat {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, PDType0Font> getFontMap(PDDocument doc) {
|
|
|
|
public Map<String, PDType0Font> getFontMap(PDFWriter writer) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, PDType0Font> fontMap = Map.of(
|
|
|
|
Map<String, PDType0Font> fontMap = Map.of(
|
|
|
|
"gulim", PDType0Font.load(doc, new ClassPathResource("fonts/gulim.ttf").getInputStream()),
|
|
|
|
"gulim", writer.font("fonts/gulim.ttf"),
|
|
|
|
"gulimche", PDType0Font.load(doc, new ClassPathResource("fonts/gulimche.ttf").getInputStream()),
|
|
|
|
"gulimche", writer.font("fonts/gulimche.ttf"),
|
|
|
|
"batang", PDType0Font.load(doc, new ClassPathResource("fonts/batang.ttf").getInputStream()),
|
|
|
|
"batang", writer.font("fonts/batang.ttf"),
|
|
|
|
"batangche", PDType0Font.load(doc, new ClassPathResource("fonts/batangche.ttf").getInputStream()),
|
|
|
|
"batangche", writer.font("fonts/batangche.ttf"),
|
|
|
|
"dotum", PDType0Font.load(doc, new ClassPathResource("fonts/dotum.ttf").getInputStream()),
|
|
|
|
"dotum", writer.font("fonts/dotum.ttf"),
|
|
|
|
"dotumche", PDType0Font.load(doc, new ClassPathResource("fonts/dotumche.ttf").getInputStream()),
|
|
|
|
"dotumche", writer.font("fonts/dotumche.ttf"),
|
|
|
|
"gungsuh", PDType0Font.load(doc, new ClassPathResource("fonts/gungsuh.ttf").getInputStream()),
|
|
|
|
"gungsuh", writer.font("fonts/gungsuh.ttf"),
|
|
|
|
"gungsuhche", PDType0Font.load(doc, new ClassPathResource("fonts/gungsuhche.ttf").getInputStream())
|
|
|
|
"gungsuhche", writer.font("fonts/gungsuhche.ttf")
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return fontMap;
|
|
|
|
return fontMap;
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|