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

Custom style table header with page wrap does not work #383

Open
schiwekM opened this issue Jun 26, 2024 · 0 comments
Open

Custom style table header with page wrap does not work #383

schiwekM opened this issue Jun 26, 2024 · 0 comments

Comments

@schiwekM
Copy link

How should the feature work?

Thanks for the amazing package for generating PDFs. While using it in a project I noticed, that the table wrap across pages does not work when the header has custom styles. Second page will be empty in this case.

The logic currently checks for header rows which have the type header / header row (https://github.com/techprimate/TPPDF/blob/main/Source/Internal/Table/PDFTableObject.swift#L108), however with a custom style the type is custom (https://github.com/techprimate/TPPDF/blob/main/Source/Internal/Table/PDFTableObject.swift#L561). This leads to no header row being detected causing an empty page where the second part of a table should be, if the table has to many rows for the page. When the header cells do not have a custom style the page wrap properly works.

What should it look like?

Ideally it should be possible to specify custom styles for headers with the header still being detected.
For solving this either the condition for checking the type of header cells should be removed or it should be possible to specify a custom style also as header and add this as an additional condition.

I guess there might also be a bug with the wrap across pages without a header row as I would have assumed it defaults to this behaviour instead of showing an empty page.

TPPDF Environment

TPPDF version: 2.4.1
Xcode version: 15.4
Swift version: 17.4

Thanks for considering. I'll also happily contribute it, just would like to know which variant would be preferred.

BR,
Marten

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

1 participant