diff --git a/app/Services/EmploymentCertService.php b/app/Services/EmploymentCertService.php index 06e66b21..70733672 100644 --- a/app/Services/EmploymentCertService.php +++ b/app/Services/EmploymentCertService.php @@ -76,21 +76,24 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); - $pdf->SetMargins(20, 20, 20); + $pdf->SetMargins(20, 30, 20); $pdf->SetAutoPageBreak(true, 20); $font = $this->getKoreanFont(); $pdf->AddPage(); + // 상단 여백 + $pdf->Ln(10); + // 제목 - $pdf->SetFont($font, 'B', 22); + $pdf->SetFont($font, 'B', 24); $pdf->Cell(0, 20, '재 직 증 명 서', 0, 1, 'C'); - $pdf->Ln(8); + $pdf->Ln(12); // === 1. 인적사항 === - $pdf->SetFont($font, 'B', 12); - $pdf->Cell(0, 8, '1. 인적사항', 0, 1, 'L'); + $pdf->SetFont($font, 'B', 13); + $pdf->Cell(0, 10, '1. 인적사항', 0, 1, 'L'); $pdf->Ln(2); $this->addTableRow($pdf, $font, [ @@ -100,11 +103,11 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $this->addTableRow($pdf, $font, [ ['주 소', $content['address'] ?? '-', 0], ]); - $pdf->Ln(6); + $pdf->Ln(8); // === 2. 재직사항 === - $pdf->SetFont($font, 'B', 12); - $pdf->Cell(0, 8, '2. 재직사항', 0, 1, 'L'); + $pdf->SetFont($font, 'B', 13); + $pdf->Cell(0, 10, '2. 재직사항', 0, 1, 'L'); $pdf->Ln(2); $this->addTableRow($pdf, $font, [ @@ -123,34 +126,34 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $this->addTableRow($pdf, $font, [ ['재직기간', $hireDateDisplay, 0], ]); - $pdf->Ln(6); + $pdf->Ln(8); // === 3. 발급정보 === - $pdf->SetFont($font, 'B', 12); - $pdf->Cell(0, 8, '3. 발급정보', 0, 1, 'L'); + $pdf->SetFont($font, 'B', 13); + $pdf->Cell(0, 10, '3. 발급정보', 0, 1, 'L'); $pdf->Ln(2); $this->addTableRow($pdf, $font, [ ['사용용도', $content['purpose'] ?? '-', 0], ]); - $pdf->Ln(12); + $pdf->Ln(20); // 증명 문구 - $pdf->SetFont($font, '', 12); - $pdf->Cell(0, 10, '위 사항을 증명합니다.', 0, 1, 'C'); - $pdf->Ln(6); + $pdf->SetFont($font, '', 14); + $pdf->Cell(0, 12, '위 사항을 증명합니다.', 0, 1, 'C'); + $pdf->Ln(10); // 발급일 $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->SetFont($font, 'B', 14); + $pdf->Cell(0, 12, $issueDateFormatted, 0, 1, 'C'); + $pdf->Ln(20); // 회사명 + 대표이사 $ceoName = $content['ceo_name'] ?? ''; - $pdf->SetFont($font, 'B', 14); - $pdf->Cell(0, 10, ($content['company_name'] ?? '').' 대표이사 '.$ceoName.' (인)', 0, 1, 'C'); + $pdf->SetFont($font, 'B', 16); + $pdf->Cell(0, 12, ($content['company_name'] ?? '').' 대표이사 '.$ceoName.' (인)', 0, 1, 'C'); $pdfContent = $pdf->Output('', 'S'); $fileName = '재직증명서_'.($content['name'] ?? '').'.pdf'; @@ -167,24 +170,24 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response private function addTableRow(\TCPDF $pdf, string $font, array $cells): void { $pageWidth = $pdf->getPageWidth() - 40; // margins - $rowHeight = 8; + $rowHeight = 10; $thWidth = 30; if (count($cells) === 1) { // 단일 셀: th + td (전체 너비) - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 11); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cells[0][0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 11); $pdf->Cell($pageWidth - $thWidth, $rowHeight, $cells[0][1], 1, 1, 'L'); } else { // 복수 셀: th+td + th+td $tdWidth = ($pageWidth - $thWidth * 2) / 2; foreach ($cells as $cell) { - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 11); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cell[0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 11); $pdf->Cell($tdWidth, $rowHeight, $cell[1], 1, 0, 'L'); } $pdf->Ln(); diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index f562247b..fff86c0a 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -1017,10 +1017,10 @@ function printCertPreview() { const content = document.getElementById('cert-preview-content').innerHTML; const win = window.open('', '_blank', 'width=800,height=1000'); win.document.write('