From e48a0064802ad86e4f2dfa1a497e2a23997f6d7c Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 28 Sep 2026 15:45:02 +0530 Subject: [PATCH] changed to mpdf packagein sticker pdf service --- app/Services/StickerPdfService.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/Services/StickerPdfService.php b/app/Services/StickerPdfService.php index 5d848ca..969e15a 100644 --- a/app/Services/StickerPdfService.php +++ b/app/Services/StickerPdfService.php @@ -669,12 +669,20 @@ class StickerPdfService $ttfPath = storage_path('app/fonts/' . $font . '.ttf'); if (file_exists($ttfPath)) { - $font = TCPDF_FONTS::addTTFfont( - $ttfPath, - 'TrueTypeUnicode', - '', - 32 - ); + $fontName = pathinfo($ttfPath, PATHINFO_FILENAME); + + $mpdf = new \Mpdf\Mpdf([ + 'fontDir' => [ + dirname($ttfPath), + ], + 'fontdata' => [ + 'customfont' => [ + 'R' => basename($ttfPath), + ], + ], + ]); + + $font = 'customfont'; } else { $font = 'helvetica'; } -- 2.49.1