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

Table is split too early to the next page #249

Closed
icarus31 opened this issue Nov 14, 2020 · 2 comments
Closed

Table is split too early to the next page #249

icarus31 opened this issue Nov 14, 2020 · 2 comments

Comments

@icarus31
Copy link

Hi,

I am using the latest 2.3.1 with merged code from feature/205.

With or without the merge, the table was always cut too soon leaving a big white space before continuing to the next page.

After checking the code, I found 'calculateBottomMaximum'. Is it possible the actual code below should be the one suggested? For sure, the new one works good for me.

Actual:

internal static func calculateBottomMaximum(for generator: PDFGenerator) -> CGFloat {
    let layout = generator.layout
    let pageLayout = generator.document.layout

    return pageLayout.height
        - layout.margin.top
        - layout.heights.maxHeaderHeight()
}

New:

internal static func calculateBottomMaximum(for generator: PDFGenerator) -> CGFloat {
    let layout = generator.layout
    let pageLayout = generator.document.layout

    return pageLayout.height
        - layout.margin.bottom
        - layout.heights.maxFooterHeight()
}
@philprime
Copy link
Member

Hi there, yes this actually is the issue @lpeancovschi discovered too/fixed in #252

@philprime
Copy link
Member

This should be fixed in 2.3.2 now. Please reopen if error still occurs.

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

No branches or pull requests

2 participants