Merge pull request 'changed to mpdf packagein sticker pdf service' (#1108) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s

Reviewed-on: #1108
This commit was merged in pull request #1108.
This commit is contained in:
2026-09-28 10:15:18 +00:00

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