1
0
forked from poc/pds

changed to mpdf packagein sticker pdf service

This commit is contained in:
dhanabalan
2026-09-28 15:45:02 +05:30
parent 429f1b8c9b
commit e48a006480

View File

@@ -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';
}