Skip to content

Fix for NotSupportedException if AreaBreak is inside a flex container… #39

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

IBaltaga
Copy link

@IBaltaga IBaltaga commented Jul 7, 2025

Itext seem to not support PageBreak when rendering to pdf if we put it inside a Div with the display:flex style.
For example:

<div style="display:flex;">
    <p>Hello1</p>
    <div style="page-break-after:always"></div>
    <p>Hello2</p>
</div>

will thrown an exception because it will try to draw the AreaBreak.

Did a hotfix to be able to handle even the AreaBreak when parsing the elements inside the Flex container div.

@IBaltaga IBaltaga marked this pull request as draft July 7, 2025 09:10
@IBaltaga IBaltaga marked this pull request as ready for review July 7, 2025 09:12
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.

1 participant