Skip to content

Commit

Permalink
rework toc length calculation - all values from toc.jrxml (#2038)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschaer committed Aug 29, 2024
1 parent fb93b93 commit 0e3332d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyramid_oereb/contrib/print_proxy/mapfish_print/toc_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 0e3332d

Please sign in to comment.