Fix footer height calculation#252
Conversation
|
Hi, thanks for your contribution. After a quick look I need you to provide an example to reproduce the issue, as your fix seems wrong: The method you changed calculates the distance from the top edge, therefore it is paper_height - footer_height. I could be wrong, that's why an example would be great |
|
Hello @philprime, Thanks for looking at this! The issue is reproducible when you have a table that is rendered over a footer. To reproduce it you can paste this method to the HeaderFooterExampleFactory.swift: Here's how it looks without the fix: And this is with the fix: |
|
Thanks a lot for the example! Helps massively. |
|
I took a closer look, and you were right. The calculation itself doesn't make any sense and seems to be a copy paste error. Anyways I added a suggestion so the method includes all paddings, spacings etc. If you approve my recommendation we can merge it into |
|
Can you please apply my suggested change and update the PR? I will merge it afterwards and release an update |
|
Relates to #249 |
|
Amazing, thanks for reviewing this PR! |
|
Don't know why the code analysis is failing. Codacy doesn't provide much context. |
|
@philprime are you planning to release #223 too? |
|
Don't worrry about Codacy, looks like some project linking issue. They changed their GitHub integration a little while ago so it might be broken. Yes I am planning to release #223 too |


Fixes footer height calculation.
Without this fix footer height is equal to header height. That means that if you don't have a header but do have a footer your content will overlap the footer because header height is zero.