[1268][1295] pdf 출력 세로->가로 혼합

This commit is contained in:
ysCha 2026-03-11 11:03:06 +09:00
parent 3612c50d20
commit abf1f91a39

View File

@ -1716,8 +1716,14 @@ public class EstimateService {
} }
} }
// 섹션별 방향 설정 (이미지가 들어가는 섹션은 가로)
java.util.Map<String, Boolean> sectionOrientation = new java.util.HashMap<>();
sectionOrientation.put("div.section3", true); // 발전시뮬레이션 - 가로
sectionOrientation.put("div.section4", true); // 도면 - 가로
sectionOrientation.put("div.section5", true); // 도면 - 가로
// pdf 다운로드 // pdf 다운로드
PdfUtil.pdfDownload(request, response, doc, estimateRequest.getFileName(), arrSection); PdfUtil.pdfDownload(request, response, doc, estimateRequest.getFileName(), arrSection, false, sectionOrientation);
} else { } else {
@ -2491,7 +2497,7 @@ public class EstimateService {
if (data.getDrawingImg1() != null) { if (data.getDrawingImg1() != null) {
elm = doc.getElementById("drawingImg1"); elm = doc.getElementById("drawingImg1");
String imgSrc1 = Base64.getEncoder().encodeToString(data.getDrawingImg1()); String imgSrc1 = Base64.getEncoder().encodeToString(data.getDrawingImg1());
elm.html("<img src='data:image/png;base64," + imgSrc1 + "' width='660'/>"); elm.html("<img src='data:image/png;base64," + imgSrc1 + "' width='100%'/>");
} }
if (data.getRoofInfo().getCompasDegImg() != null) { if (data.getRoofInfo().getCompasDegImg() != null) {
@ -2608,7 +2614,7 @@ public class EstimateService {
if (data.getDrawingImg2() != null) { if (data.getDrawingImg2() != null) {
elm = doc.getElementById("drawingImg2"); elm = doc.getElementById("drawingImg2");
String imgSrc2 = Base64.getEncoder().encodeToString(data.getDrawingImg2()); String imgSrc2 = Base64.getEncoder().encodeToString(data.getDrawingImg2());
elm.html("<img src='data:image/png;base64," + imgSrc2 + "' width='660'/>"); elm.html("<img src='data:image/png;base64," + imgSrc2 + "' width='100%'/>");
} }
if (data.getRoofInfo().getCompasDegImg() != null) { if (data.getRoofInfo().getCompasDegImg() != null) {