diff --git a/app/Services/ResignationService.php b/app/Services/ResignationService.php index 165cb118..91fc77f5 100644 --- a/app/Services/ResignationService.php +++ b/app/Services/ResignationService.php @@ -77,17 +77,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->SetFont($font, 'B', 24); $pdf->Cell(0, 20, '사 직 서', 0, 1, 'C'); - $pdf->Ln(8); + $pdf->Ln(20); // 테이블 $this->addTableRow($pdf, $font, [ @@ -108,29 +111,29 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $this->addTableRow($pdf, $font, [ ['사 유', $content['reason'] ?? '-', 0], ]); - $pdf->Ln(12); + $pdf->Ln(30); // 증명 문구 - $pdf->SetFont($font, '', 12); - $pdf->MultiCell(0, 8, '상기 본인은 위 사유로 인하여 사직하고자'."\n".'이에 사직서를 제출하오니 허가하여 주시기 바랍니다.', 0, 'C'); - $pdf->Ln(6); + $pdf->SetFont($font, '', 14); + $pdf->MultiCell(0, 10, '상기 본인은 위 사유로 인하여 사직하고자'."\n".'이에 사직서를 제출하오니 허가하여 주시기 바랍니다.', 0, 'C'); + $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(6); + $pdf->SetFont($font, 'B', 14); + $pdf->Cell(0, 12, $issueDateFormatted, 0, 1, 'C'); + $pdf->Ln(10); // 신청인 - $pdf->SetFont($font, '', 12); - $pdf->Cell(0, 10, '신청인 '.($content['name'] ?? '').' (인)', 0, 1, 'C'); - $pdf->Ln(12); + $pdf->SetFont($font, '', 14); + $pdf->Cell(0, 12, '신청인 '.($content['name'] ?? '').' (인)', 0, 1, 'C'); + $pdf->Ln(30); // 회사명 + 대표이사 귀하 $ceoName = $content['ceo_name'] ?? ''; - $pdf->SetFont($font, 'B', 14); - $pdf->Cell(0, 10, ($content['company_name'] ?? '').' 대표이사 귀하', 0, 1, 'C'); + $pdf->SetFont($font, 'B', 16); + $pdf->Cell(0, 12, ($content['company_name'] ?? '').' 대표이사 귀하', 0, 1, 'C'); $pdfContent = $pdf->Output('', 'S'); $fileName = '사직서_'.($content['name'] ?? '').'.pdf'; @@ -144,22 +147,22 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response private function addTableRow(\TCPDF $pdf, string $font, array $cells): void { $pageWidth = $pdf->getPageWidth() - 40; - $rowHeight = 8; + $rowHeight = 12; $thWidth = 30; if (count($cells) === 1) { - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 12); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cells[0][0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 12); $pdf->Cell($pageWidth - $thWidth, $rowHeight, $cells[0][1], 1, 1, 'L'); } else { $tdWidth = ($pageWidth - $thWidth * 2) / 2; foreach ($cells as $cell) { - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 12); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cell[0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 12); $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 ac07fc0b..4ada3b3c 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -1420,23 +1420,23 @@ function printResignationPreview() { const content = document.getElementById('resignation-preview-content').innerHTML; const win = window.open('', '_blank', 'width=800,height=1000'); win.document.write('