Skip to content

correction on page break when cell is too height#57

Open
simon-ezacae wants to merge 4 commits into
natancabral:mainfrom
simon-ezacae:main
Open

correction on page break when cell is too height#57
simon-ezacae wants to merge 4 commits into
natancabral:mainfrom
simon-ezacae:main

Conversation

@simon-ezacae

Copy link
Copy Markdown

No description provided.

@ELIONET

ELIONET commented Dec 6, 2022

Copy link
Copy Markdown

@natancabral Could you please accept this pull request ?

@fellmann

Copy link
Copy Markdown

@simon-feamzy

  1. I found the correct calculation to be:
    if (options.useSafelyMarginBottom && rowBottomY + rowHeight + columnSpacing + safelyMarginBottom >= maxY && !lockAddPage) onFirePageAdded();
    You were missing columnSpacing.
  2. You fixed the bug in line 661, same bug is in line 811

@natancabral This seems a critical bug to me. Is this library still maintained?

@fellmann

Copy link
Copy Markdown

Plus, if the calculation is fixed, I would propose to reduce the magic safelyMarginBottom. Either to 0, or a small fixed amount like

let safelyMarginBottom = 14 /* points = 0.5 cm */

Right now, it is half the top margin, which is a problem with a large top margin e.g. if there is a letterhead.

@fellmann

fellmann commented Jun 28, 2023

Copy link
Copy Markdown

P.S.: fixes #62

jjchiw added a commit to jjchiw/pdfkit-table that referenced this pull request Jul 7, 2023
@pernikov

Copy link
Copy Markdown

Thanks for the fix @fellmann, it's a shame it's not merged

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

Successfully merging this pull request may close these issues.

4 participants