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

Foot gets accounted for on pages without footer #434

Closed
MikeMatrix opened this issue Jan 25, 2019 · 3 comments
Closed

Foot gets accounted for on pages without footer #434

MikeMatrix opened this issue Jan 25, 2019 · 3 comments

Comments

@MikeMatrix
Copy link

Using 3.0.4 utilizing the option showFoot: 'lastPage', footer height get's accounted for on pages, that do not actually display a footer.

This is apparent looking at the code at the canFitOnPage function in https://github.com/simonbengtsson/jsPDF-AutoTable/blob/master/src/tableDrawer.ts#L191

[...]
if (showFoot === true || showFoot === 'everyPage' || showFoot === 'lastPage') {
    bottomContentHeight += table.footHeight;
}
[...]
@simonbengtsson
Copy link
Owner

Oh! Can you send a pr to fix it and I'l merge it in asap 👍

@MikeMatrix
Copy link
Author

When I get around to it, for sure. It's mostly just passing along if it's the last row or not, then enabling that consideration only in case it's the very last row in body.

@MikeMatrix
Copy link
Author

Fix worked like a charm. Thanks a lot!
:shipit: 👍

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

No branches or pull requests

2 participants