changed to mpdf packagein sticker pdf service #1108

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-28 10:15:19 +00:00

View File

@@ -669,12 +669,20 @@ class StickerPdfService
$ttfPath = storage_path('app/fonts/' . $font . '.ttf'); $ttfPath = storage_path('app/fonts/' . $font . '.ttf');
if (file_exists($ttfPath)) { if (file_exists($ttfPath)) {
$font = TCPDF_FONTS::addTTFfont( $fontName = pathinfo($ttfPath, PATHINFO_FILENAME);
$ttfPath,
'TrueTypeUnicode', $mpdf = new \Mpdf\Mpdf([
'', 'fontDir' => [
32 dirname($ttfPath),
); ],
'fontdata' => [
'customfont' => [
'R' => basename($ttfPath),
],
],
]);
$font = 'customfont';
} else { } else {
$font = 'helvetica'; $font = 'helvetica';
} }