Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toc calculations #147

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Toc calculations #147

wants to merge 5 commits into from

Conversation

voisardf
Copy link
Collaborator

This version of the templates adapts the line heights and spacings in the TOC page and the associated subreports where different field sizes have been defined.
TOC calculations should be simplified this way and the pdf creation should still work as expected

  • For the theme list in detail 2 band the TOC was defined by a height of 17px, but the subreport has a min height of 20px
  • For the detail 3 band, the subreport had a initial height of 15px whereas the subreport only has a height of 12px
  • For the detail 5, we defined a min height of 93px - probably to ensure the general information part (detail 6) is pushed at the bottom of the page or on a new page. But the specification mentions nothing about that alignement. So I adjusted the spacing between detail 5 and 6 to 1cm
    This leads to a lot more of the PDF's with only one TOC page in our case.

new:
TOC_adapted_spacing_line_heights

20241025085449_extract.pdf

before:
TOC_default_1line_for_d1_77px

66aca8c4-101f-4b40-b6ab-b1841f111be5.pdf

You may wan't to try this branch of mfp with the toc_calculations branch: PR openoereb/pyramid_oereb#2047

@michmuel
Copy link
Collaborator

I think it is not ideal to have a heading without an item. I would appreciate something like "None", but I guess that is not supported by Swisstopo.

oereb-print-image-1

@voisardf
Copy link
Collaborator Author

This is probably the reason why we had the larger spacing at the bottom of the page. - We could potentially print à "-" to indicate that there are no themes in this category. Or we increase the spacing to 2cm.
Probably the better choice would be the indication that none are concerned ("-")

@michmuel
Copy link
Collaborator

This is probably the reason why we had the larger spacing at the bottom of the page. - We could potentially print à "-" to indicate that there are no themes in this category. Or we increase the spacing to 2cm. Probably the better choice would be the indication that none are concerned ("-")

The dash sounds good to me as we have this element already in use at "Übrige Legende (im sichtbaren Bereich)" for the case of no items.

Copy link
Collaborator

@svamaa svamaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did test the branch within our environment. However, table of contents page did not change. The block around the general information and QR Code are all on the second page.
Maybe we'll need more testing from other cantons?

@voisardf
Copy link
Collaborator Author

voisardf commented Nov 1, 2024

@svamaa depending on the number of themes, that is possible. More testing is always helpful 👍
did you make a clean testing instance (delete oereb base images)

@lopo977
Copy link
Collaborator

lopo977 commented Nov 4, 2024

This is our (TI) PDF output with this #147 merged.
I choose a parcel with some themes.
20241104110131_extract.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants