diff --git a/app/Services/ESign/PdfSignatureService.php b/app/Services/ESign/PdfSignatureService.php index ccd00d5f..5116b2fd 100644 --- a/app/Services/ESign/PdfSignatureService.php +++ b/app/Services/ESign/PdfSignatureService.php @@ -23,7 +23,12 @@ private function getKoreanFont(): string $fontPath = '/usr/share/fonts/truetype/nanum/NanumGothic.ttf'; if (file_exists($fontPath)) { - $this->koreanFontName = \TCPDF_FONTS::addTTFfont($fontPath, 'TrueTypeUnicode', '', 96); + // 폰트 캐시를 storage에 저장 (vendor 디렉토리 쓰기 권한 문제 방지) + $fontCacheDir = storage_path('app/private/fonts'); + if (! is_dir($fontCacheDir)) { + mkdir($fontCacheDir, 0775, true); + } + $this->koreanFontName = \TCPDF_FONTS::addTTFfont($fontPath, 'TrueTypeUnicode', '', 96, $fontCacheDir.'/'); } return $this->koreanFontName ?: 'helvetica';