fix: [approvals] 위촉증명서 인쇄/PDF A4 레이아웃 수직 배분 개선

- 인쇄 CSS: @page A4 적용, 상단 padding 100px로 확대
- HTML 미리보기: 제목/테이블/증명문구/날짜/서명 간격 확대
- PDF: 상단 여백 및 섹션 간 Ln 값 증가 (A4 수직 균등 배분)
This commit is contained in:
김보곤
2026-03-06 10:08:55 +09:00
parent b05daffedb
commit 10b3490d9c
3 changed files with 24 additions and 21 deletions

View File

@@ -78,17 +78,20 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetMargins(20, 20, 20);
$pdf->SetMargins(20, 40, 20);
$pdf->SetAutoPageBreak(true, 20);
$font = $this->getKoreanFont();
$pdf->AddPage();
// 상단 여백
$pdf->Ln(20);
// 제목
$pdf->SetFont($font, 'B', 22);
$pdf->Cell(0, 20, '위 촉 증 명 서', 0, 1, 'C');
$pdf->Ln(8);
$pdf->Ln(20);
$pageWidth = $pdf->getPageWidth() - 40;
$thWidth = 30;
@@ -119,19 +122,19 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response
$this->addTableRow($pdf, $font, [
['용 도', $content['purpose'] ?? '-', 0],
]);
$pdf->Ln(12);
$pdf->Ln(30);
// 증명 문구
$pdf->SetFont($font, '', 12);
$pdf->Cell(0, 10, '위와 같이 위촉하였음을 증명합니다.', 0, 1, 'C');
$pdf->Ln(6);
$pdf->Ln(20);
// 발급일
$issueDate = $content['issue_date'] ?? date('Y-m-d');
$issueDateFormatted = $this->formatDate($issueDate);
$pdf->SetFont($font, 'B', 12);
$pdf->Cell(0, 10, $issueDateFormatted, 0, 1, 'C');
$pdf->Ln(12);
$pdf->Ln(30);
// 회사명 + 대표이사
$ceoName = $content['ceo_name'] ?? '';