From 10c0d95f34d84d1db3ef013a698666430d47d931 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 13 Mar 2023 14:21:10 +0100 Subject: [PATCH] Reports PDFS changes --- pandora_console/include/styles/pandoraPDF.css | 2 +- .../mpdf/mpdf/src/Config/FontVariables.php | 6 +++++ pandora_console/vendor/mpdf/mpdf/src/Mpdf.php | 25 ++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/styles/pandoraPDF.css b/pandora_console/include/styles/pandoraPDF.css index 334c47428f..05bf20b846 100644 --- a/pandora_console/include/styles/pandoraPDF.css +++ b/pandora_console/include/styles/pandoraPDF.css @@ -38,7 +38,7 @@ table.header_table tr td { } table thead tr th { - background-color: #919191; + background-color: #e5e5e5; } table thead tr th.title_table_pdf { diff --git a/pandora_console/vendor/mpdf/mpdf/src/Config/FontVariables.php b/pandora_console/vendor/mpdf/mpdf/src/Config/FontVariables.php index 777ebf8a74..b450044beb 100644 --- a/pandora_console/vendor/mpdf/mpdf/src/Config/FontVariables.php +++ b/pandora_console/vendor/mpdf/mpdf/src/Config/FontVariables.php @@ -286,6 +286,9 @@ class FontVariables "unbatang" => [/* Korean */ 'R' => "UnBatang_0613.ttf", ], + "lato" => [/* lato */ + 'R' => 'Lato-Regular.ttf', + ], ], // Add fonts to this array if they contain characters in the SIP or SMP Unicode planes @@ -296,6 +299,7 @@ class FontVariables "dejavuserifcondensed", "dejavuserif", "dejavusansmono", + "lato", ], // These next 3 arrays do two things: @@ -321,6 +325,8 @@ class FontVariables 'mono_fonts' => ['dejavusansmono', 'mono', 'monospace', 'freemono', 'liberationmono', 'courier', 'ocrb', 'ocr-b', 'lucidaconsole', 'couriernew', 'monotypecorsiva' ], + + 'lato' => ['lato'], ]; } diff --git a/pandora_console/vendor/mpdf/mpdf/src/Mpdf.php b/pandora_console/vendor/mpdf/mpdf/src/Mpdf.php index ffe70a1f64..74166a63dc 100644 --- a/pandora_console/vendor/mpdf/mpdf/src/Mpdf.php +++ b/pandora_console/vendor/mpdf/mpdf/src/Mpdf.php @@ -468,6 +468,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface var $serif_fonts; var $mono_fonts; var $defaultSubsFont; + var $lato; // List of ALL available CJK fonts (incl. styles) (Adobe add-ons) hw removed var $available_CJK_fonts; @@ -1478,15 +1479,31 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface $default_font = $this->defaultCSS['BODY']['FONT-FAMILY']; } } + + if ($default_font) { + $this->SetDefaultFont($default_font); + } + if (!$default_font_size) { $mmsize = $this->sizeConverter->convert($this->defaultCSS['BODY']['FONT-SIZE']); $default_font_size = $mmsize * (Mpdf::SCALE); } - if ($default_font) { - $this->SetDefaultFont($default_font); - } - if ($default_font_size) { + if ($_SESSION['font_size_report']) { + // DefaultCss. + $this->defaultCSS['BODY']['FONT-SIZE'] = $_SESSION['font_size_report'].'px'; + $this->defaultCSS['TABLE']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->defaultCSS['THEAD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->defaultCSS['TH']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->defaultCSS['TD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + // CssManager. + $this->cssManager->CSS['BODY']['FONT-SIZE'] = $_SESSION['font_size_report'].'px'; + $this->cssManager->CSS['TABLE']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->cssManager->CSS['THEAD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->cssManager->CSS['TH']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + $this->cssManager->CSS['TD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt'; + + } elseif ($default_font_size) { $this->SetDefaultFontSize($default_font_size); }