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

When a large amount of data is entered into a 'td' cell within a table, exceeding the length of two pages, the table automatically paginates. This results in a blank content area above the table. #1326

Open
EnochGao opened this issue May 11, 2024 · 5 comments
Labels

Comments

@EnochGao
Copy link
Sponsor Member

Describe the bug
When a large amount of data is entered into a 'td' cell within a table, exceeding the length of two pages, the table automatically paginates. This results in a blank content area above the table.

To Reproduce
table_bug.txt
online viewer
image

@EnochGao
Copy link
Sponsor Member Author

This could be a table header related issue
table_bug.txt
image
image

@EnochGao
Copy link
Sponsor Member Author

I found that for the time being you can set the display property to simulate the table
pseudo_table.txt

@MurakamiShinyu
Copy link
Member

I made a simple test case.

https://gist.github.com/MurakamiShinyu/22585fe8c74d2114477117d7d2cd0ff6#file-table-break-1-html

Test with Vivliostyle Viewer:

I think I can fix it today.

@EnochGao
Copy link
Sponsor Member Author

Hi, Shinyu, how is the progress coming along?

@MurakamiShinyu
Copy link
Member

Hi, I'm still debugging it.

It seems the overflow checking has problem when table or table-cell has border and paddings.

checkOverflowAndSaveEdgeAndBreakPosition(
nodeContext: Vtree.NodeContext,
trailingEdgeContexts: Vtree.NodeContext[],
saveEvenOverflown: boolean,
breakAtTheEdge: string | null,
): boolean {
if (!nodeContext) {
return false;
}
if (LayoutHelper.isOrphan(nodeContext.viewNode)) {
return false;
}
const overflown = this.checkOverflowAndSaveEdge(
nodeContext,
trailingEdgeContexts,
);
if (saveEvenOverflown || !overflown) {
this.saveEdgeBreakPosition(nodeContext, breakAtTheEdge, overflown);
}
return overflown;
}

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

No branches or pull requests

2 participants