refactor(pdf): switch AWB template to landscape orientation
Update the AWB document generation to use landscape mode and adjust the layout to utilize the additional horizontal space. Key changes: - Change `PdfService` orientation from portrait to landscape for AWB. - Refactor `awb.blade.php` to use a side-by-side layout for terms and signatures. - Adjust grid column widths from 50% to 25% to accommodate the new orientation. - Update `@page` margin definitions for better print alignment.
This commit is contained in:
parent
d4b9e5bff5
commit
93bcfb9ce7
@ -33,7 +33,7 @@ class PdfService
|
||||
|
||||
$html = view('pdfs.awb', $data)->render();
|
||||
|
||||
return $this->generatePdf($html, 'A4', 'portrait');
|
||||
return $this->generatePdf($html, 'A4', 'landscape');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -13,11 +13,14 @@
|
||||
}
|
||||
/* ⚠️ Dompdf از box-sizing: border-box پشتیبانی نمیکند —
|
||||
width باید 100% ناحیه قابل چاپ باشد و حاشیهها با @page داده شوند؛
|
||||
width: 210mm + padding یعنی 230mm واقعی و بیرونزدگی از سمت راست. */
|
||||
@page { margin: 8mm 10mm; }
|
||||
.page {
|
||||
width: 100%;
|
||||
}
|
||||
width: 210mm + padding یعنی 230mm واقعی و بیرونزدگی از سمت راست.
|
||||
موقتی یه تغییری برای تست میدهیم. */
|
||||
@page {
|
||||
margin-top: 10mm;
|
||||
margin-bottom: 10mm;
|
||||
margin-left: 15mm;
|
||||
margin-right: 15mm;
|
||||
}
|
||||
|
||||
/* ════════ Brand Colors ════════ */
|
||||
/* Navy: #1a1a2e | Orange accent: #f59e0b | Gray bg: #f3f4f6 */
|
||||
@ -108,9 +111,10 @@
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.grid-table > tbody > tr > td {
|
||||
width: 50%;
|
||||
width: 25%; /* ✅ ۴ ستونه در عرضی */
|
||||
vertical-align: top;
|
||||
border: 1.5px solid #1a1a2e;
|
||||
border-right: 0.5px solid #1a1a2e;
|
||||
padding: 0;
|
||||
}
|
||||
.grid-table > tbody > tr > td.left {
|
||||
@ -439,22 +443,28 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- ════════ NOTES ════════ -->
|
||||
<div class="notes">
|
||||
<div class="notes-title">⚠ Terms & Conditions</div>
|
||||
Door-to-door service applies only to general cargo without special approvals. Consignee is responsible for import rules at destination. All shipments are subject to customs approval at origin and destination. The courier company cannot guarantee clearance.
|
||||
</div>
|
||||
|
||||
<!-- ════════ SIGNATURE ════════ -->
|
||||
<table class="signature-table">
|
||||
<!-- ════════ NOTES + SIGNATURE (side by side in landscape) ════════ -->
|
||||
<table style="width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 6px;">
|
||||
<tr>
|
||||
<td style="border-left: 1px solid #e5e7eb;">
|
||||
Shipper Name & Signature
|
||||
<div class="sig-line"></div>
|
||||
<td style="width: 60%; vertical-align: top; padding-right: 6px;">
|
||||
<div class="notes" style="height: 45mm;">
|
||||
<div class="notes-title">⚠ Terms & Conditions</div>
|
||||
Door-to-door service applies only to general cargo without special approvals. Consignee is responsible for import rules at destination. All shipments are subject to customs approval at origin and destination.
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
Date
|
||||
<div class="sig-line">...../...../..........</div>
|
||||
<td style="width: 40%; vertical-align: top;">
|
||||
<table class="signature-table" style="height: 45mm;">
|
||||
<tr>
|
||||
<td style="border-left: 1px solid #e5e7eb;">
|
||||
Shipper Signature
|
||||
<div class="sig-line"></div>
|
||||
</td>
|
||||
<td>
|
||||
Date
|
||||
<div class="sig-line">...../...../..........</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
BIN
sample pdf/INVOICE-IFN-2026-77973.pdf
Normal file
BIN
sample pdf/INVOICE-IFN-2026-77973.pdf
Normal file
Binary file not shown.
BIN
sample pdf/LABEL-IFN-2026-77973.pdf
Normal file
BIN
sample pdf/LABEL-IFN-2026-77973.pdf
Normal file
Binary file not shown.
BIN
sample pdf/فاکتور و لیبل مشتری.pdf
Normal file
BIN
sample pdf/فاکتور و لیبل مشتری.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user