|
3 | 3 | * @Author: Amirhossein Hosseinpour <https://amirhp.com> |
4 | 4 | * @Date Created: 2022/10/15 13:44:52 |
5 | 5 | * @Last modified by: amirhp-com <its@amirhp.com> |
6 | | - * @Last modified time: 2025/12/27 20:17:58 |
| 6 | + * @Last modified time: 2025/12/28 14:00:17 |
7 | 7 | */ |
8 | 8 |
|
9 | 9 | namespace peproulitmateinvoice; |
@@ -1036,12 +1036,12 @@ public function create_pdf($order_id = 0, $force_download = false, $MODE = "I", |
1036 | 1036 | "fontdata" => $_fontData, |
1037 | 1037 | "default_font" => $this->fn->get_pdf_font(), |
1038 | 1038 | "format" => $get_pdf_size, // A4-L |
1039 | | - "margin_right" => (float) $template_pdf_setting["pdf_margin_right"] + (float) $this->fn->get_margin_right(), |
1040 | | - "margin_left" => (float) $template_pdf_setting["pdf_margin_left"] + (float) $this->fn->get_margin_left(), |
1041 | | - "margin_top" => (float) $template_pdf_setting["pdf_margin_top"] + (float) $this->fn->get_margin_top(), |
1042 | | - "margin_bottom" => (float) $template_pdf_setting["pdf_margin_bottom"] + (float) $this->fn->get_margin_bottom(), |
1043 | | - "margin_header" => (float) $template_pdf_setting["pdf_margin_header"] + (float) $this->fn->get_margin_header(), |
1044 | | - "margin_footer" => (float) $template_pdf_setting["pdf_margin_footer"] + (float) $this->fn->get_margin_footer(), |
| 1039 | + "margin_right" => (float) $template_pdf_setting["pdf_margin_right"] + (!$fit_height ? (float) $this->fn->get_margin_right() : 0), |
| 1040 | + "margin_left" => (float) $template_pdf_setting["pdf_margin_left"] + (!$fit_height ? (float) $this->fn->get_margin_left() : 0), |
| 1041 | + "margin_top" => (float) $template_pdf_setting["pdf_margin_top"] + (!$fit_height ? (float) $this->fn->get_margin_top() : 0), |
| 1042 | + "margin_bottom" => (float) $template_pdf_setting["pdf_margin_bottom"]+ (!$fit_height ? (float) $this->fn->get_margin_bottom() : 0), |
| 1043 | + "margin_header" => (float) $template_pdf_setting["pdf_margin_header"]+ (!$fit_height ? (float) $this->fn->get_margin_header() : 0), |
| 1044 | + "margin_footer" => (float) $template_pdf_setting["pdf_margin_footer"]+ (!$fit_height ? (float) $this->fn->get_margin_footer() : 0), |
1045 | 1045 | "debug" => false, |
1046 | 1046 | "allow_output_buffering" => true, |
1047 | 1047 | "showImageErrors" => false, |
|
0 commit comments