Merge pull request 'Changed logic in sticker pdf service' (#1266) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m7s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m7s
Reviewed-on: #1266
This commit was merged in pull request #1266.
This commit is contained in:
@@ -626,7 +626,11 @@ class StickerPdfService
|
|||||||
$width = (float) $structure->sticker_width;
|
$width = (float) $structure->sticker_width;
|
||||||
$height = (float) $structure->sticker_height;
|
$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->setPrintHeader(false);
|
||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
@@ -1478,17 +1482,21 @@ class StickerPdfService
|
|||||||
// +
|
// +
|
||||||
// ($gap * ($count - 1));
|
// ($gap * ($count - 1));
|
||||||
|
|
||||||
$pdf = new TCPDF(
|
$orientation = $stickerWidth > $stickerHeight ? 'L' : 'P';
|
||||||
'P',
|
|
||||||
'mm',
|
// $pdf = new TCPDF(
|
||||||
[
|
// 'P',
|
||||||
$stickerWidth,
|
// 'mm',
|
||||||
$stickerHeight
|
// [
|
||||||
],
|
// $stickerWidth,
|
||||||
true,
|
// $stickerHeight
|
||||||
'UTF-8',
|
// ],
|
||||||
false
|
// true,
|
||||||
);
|
// 'UTF-8',
|
||||||
|
// false
|
||||||
|
// );
|
||||||
|
|
||||||
|
$pdf = new TCPDF($orientation, 'mm', [$stickerWidth, $stickerHeight], true, 'UTF-8', false);
|
||||||
|
|
||||||
$pdf->setPrintHeader(false);
|
$pdf->setPrintHeader(false);
|
||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user