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

Nested Lists in ColumnText not rendered correctly #1161

Closed
joostme opened this issue May 7, 2024 · 0 comments · Fixed by #1162
Closed

Nested Lists in ColumnText not rendered correctly #1161

joostme opened this issue May 7, 2024 · 0 comments · Fixed by #1162
Labels

Comments

@joostme
Copy link
Contributor

joostme commented May 7, 2024

Describe the bug

When adding multiple nested lists, ColumnText stops rendering the list, when the nesting is reduced by more than one nesting level.
Let's say we have the following list

  • 1
    • a
      • i
  • 2

Note the differences in nesting. ColumnText will only render "1", "a" and "i". This happens because the reduction of nesting back to "2" involves more than 1 layer of nesting. If you have a layer in between, it works.

So this example works as expected:

  • 1
    • a
      • i
    • b
  • 2

I managed to track it down to this function https://github.com/LibrePDF/OpenPDF/blob/master/openpdf/src/main/java/com/lowagie/text/pdf/ColumnText.java#L1321 where it seems to exit early when the nesting is reduced by more than one layer.

To Reproduce

I added a very simple reproduction Repo to test this: https://github.com/joostme/openpdf-test/blob/main/src/main/java/org/example/Main.java

Expected behavior

All of the list (regardless of nesting changes) should be rendered in the ColumnText.

System

  • OS: MacOS, Sonoma 14.4.1
  • Used font: Default OpenPDF Font
  • OpenPDF version: 2.0.2

Your real name

Joost Zöllner

@joostme joostme added the bug label May 7, 2024
joostme added a commit to joostme/OpenPDF that referenced this issue May 8, 2024
- When nesting level is reduced by more than one layer, ColumnText stopped rendering Lists
@asturio asturio linked a pull request May 21, 2024 that will close this issue
asturio pushed a commit that referenced this issue May 21, 2024
- When nesting level is reduced by more than one layer, ColumnText stopped rendering Lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant