Merge pull request 'removed mpdf and changed to tcpdf in sticker pdf service' (#1109) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

Reviewed-on: #1109
This commit was merged in pull request #1109.
This commit is contained in:
2026-09-28 10:30:52 +00:00

View File

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