diff --git a/app/Controllers/Subscription.php b/app/Controllers/Subscription.php index 2711f7de..e173d3bb 100644 --- a/app/Controllers/Subscription.php +++ b/app/Controllers/Subscription.php @@ -141,13 +141,13 @@ public function download_details() $configA4 = [ 'mode' => 'utf-8', - 'format' => 'A4', + 'format' => [101.6 * 2, 152.4 * 4], // 2x4 inches for each label 'default_font_size' => 12, 'default_font' => 'Arial', - 'margin_left' => 10, // Adjusted margin for better fit - 'margin_right' => 10, // Adjusted margin for better fit - 'margin_top' => 10, // Adjusted margin for better fit - 'margin_bottom' => 10, // Adjusted margin for better fit + 'margin_left' => 0, + 'margin_right' => 0, + 'margin_top' => 0, + 'margin_bottom' => 0, 'margin_header' => 0, 'margin_footer' => 0, 'orientation' => 'P', // Portrait @@ -167,8 +167,9 @@ public function download_details() } if (!empty($customerDetails)) { - $html = view('print_addresses_form', ['customerDetails' => $customerDetails , 'action' => $action ]); + $html = view('print_addresses_form', ['customerDetails' => $customerDetails , 'action' => $action , 'pdf' => $pdf]); // Add the current scheme's details to the PDF + // echo $html;die; // $pdf->AddPage(); $pdf->WriteHTML($html); // Set the PDF filename diff --git a/app/Views/print_addresses_form.php b/app/Views/print_addresses_form.php index ce271627..7fd8b3fd 100644 --- a/app/Views/print_addresses_form.php +++ b/app/Views/print_addresses_form.php @@ -6,20 +6,17 @@