From 0e3332d1a8597b8f2cfd9d94f2fabcac3924081a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Sch=C3=A4r?= Date: Thu, 29 Aug 2024 15:48:28 +0200 Subject: [PATCH] rework toc length calculation - all values from toc.jrxml (#2038) --- .../contrib/print_proxy/mapfish_print/toc_pages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyramid_oereb/contrib/print_proxy/mapfish_print/toc_pages.py b/pyramid_oereb/contrib/print_proxy/mapfish_print/toc_pages.py index dbb3d050c8..89ca967b4a 100644 --- a/pyramid_oereb/contrib/print_proxy/mapfish_print/toc_pages.py +++ b/pyramid_oereb/contrib/print_proxy/mapfish_print/toc_pages.py @@ -32,7 +32,7 @@ def compute_d2(self): blank_space_above = 2 # toc.jrxml page_label_height = 10 # toc.jrxml total_size += blank_space_above + page_label_height - toc_item_height = 20 # tocConcernedTheme.jrxml (17 in toc.jrxml) + toc_item_height = 17 # toc.jrxml (20 in tocConcernedTheme.jrxml) total_size += len(self.extract['ConcernedTheme']) * toc_item_height if total_size > self.d2_height: return total_size @@ -44,7 +44,7 @@ def compute_d3(self): blank_space_above = 26 # toc.jrxml not_concerned_themes_title_height = 15 # toc.jrxml blank_space_between = 5 # toc.jrxml - not_concerned_themes_item_height = 12 # themelist.jrxml (15 in toc.jrxml) + not_concerned_themes_item_height = 15 # toc.jrxml (12 in themelist.jrxml) total_size += blank_space_above + not_concerned_themes_title_height + blank_space_between total_size += len(self.extract['NotConcernedTheme']) * not_concerned_themes_item_height @@ -61,7 +61,7 @@ def compute_d4(self): def compute_d5(self): total_size = 0 - theme_without_data_item_height = 12 # themelist.jrxml (15 in toc.jrxml) + theme_without_data_item_height = 15 # toc.jrxml (12 in themelist.jrxml) total_size += len(self.extract['ThemeWithoutData'] * theme_without_data_item_height) if total_size > self.d5_height: return total_size