|
|
@ -4,10 +4,8 @@ import java.io.File;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
@ -54,6 +52,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
initDefaultStng();
|
|
|
|
initDefaultStng();
|
|
|
|
|
|
|
|
|
|
|
|
this.print = print;
|
|
|
|
this.print = print;
|
|
|
|
|
|
|
|
this.print.setExtension("pdf");
|
|
|
|
this.printOption = printOption;
|
|
|
|
this.printOption = printOption;
|
|
|
|
this.otptBscStng = otptBscStng;
|
|
|
|
this.otptBscStng = otptBscStng;
|
|
|
|
this.otptArtclStngList = otptArtclStngList;
|
|
|
|
this.otptArtclStngList = otptArtclStngList;
|
|
|
@ -231,7 +230,7 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
PDFWriter writer = new PDFWriter();
|
|
|
|
PDFWriter writer = new PDFWriter();
|
|
|
|
|
|
|
|
|
|
|
|
String resultFilePath = this.filePathForNewFile();
|
|
|
|
String resultFilePath = this.print.pathForNewFile();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//폰트 로드
|
|
|
|
//폰트 로드
|
|
|
@ -466,36 +465,6 @@ public abstract class PDFPrintFormat {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String filePathForNewFile() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
|
|
|
String currentTime = ymdhmsFormat.format(new Date());
|
|
|
|
|
|
|
|
String year = currentTime.substring(0, 4);
|
|
|
|
|
|
|
|
String month = currentTime.substring(4, 6);
|
|
|
|
|
|
|
|
String day = currentTime.substring(6, 8);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String fileResultRootPath = "files" + File.separator + "result" + File.separator + "print";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String fileResultFolderPath = fileResultRootPath
|
|
|
|
|
|
|
|
+ File.separator + year + File.separator + month + File.separator + day;
|
|
|
|
|
|
|
|
File formatFileResultFolder = new File(fileResultFolderPath);
|
|
|
|
|
|
|
|
if(!formatFileResultFolder.exists()) {
|
|
|
|
|
|
|
|
formatFileResultFolder.mkdirs();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String resultPdfPath = fileResultFolderPath
|
|
|
|
|
|
|
|
+ File.separator + currentTime + "_" + (print.getFileNameIndex()) + ".pdf";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.print.setFileNameIndex(this.print.getFileNameIndex()+1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return resultPdfPath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* mm단위로 입력된 값을 pdf좌표계 형식으로 변환한다.
|
|
|
|
* mm단위로 입력된 값을 pdf좌표계 형식으로 변환한다.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|