Changed logic in sticker pdf service
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 3m59s
Laravel Larastan / larastan (pull_request) Failing after 7m0s

This commit is contained in:
dhanabalan
2026-10-16 12:49:17 +05:30
parent 8df617e045
commit 43e794aaef

View File

@@ -626,7 +626,11 @@ class StickerPdfService
$width = (float) $structure->sticker_width;
$height = (float) $structure->sticker_height;
$pdf = new TCPDF('P', 'mm', [$width, $height], true, 'UTF-8', false);
$orientation = $width > $height ? 'L' : 'P';
$pdf = new TCPDF($orientation, 'mm', [$width, $height], true, 'UTF-8', false);
// $pdf = new TCPDF('P', 'mm', ['width','height'], true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
@@ -1478,17 +1482,21 @@ class StickerPdfService
// +
// ($gap * ($count - 1));
$pdf = new TCPDF(
'P',
'mm',
[
$stickerWidth,
$stickerHeight
],
true,
'UTF-8',
false
);
$orientation = $stickerWidth > $stickerHeight ? 'L' : 'P';
// $pdf = new TCPDF(
// 'P',
// 'mm',
// [
// $stickerWidth,
// $stickerHeight
// ],
// true,
// 'UTF-8',
// false
// );
$pdf = new TCPDF($orientation, 'mm', [$stickerWidth, $stickerHeight], true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);