Skip to content

Marker of unordered list item is vertically centerd when list item has multiple lines of text #477

@lukaslebo

Description

@lukaslebo

When using the ITextRendered to generate a pdf from a html containing a unodered list with list items that consist of text with multiple lines the list item marker is centered instead of aligned with the first line.

This changed in version 9.7.2 because of the issue #302:

  • since version 9.7.2 markers are vertically centered
  • up to version 9.7.1 markes are vertically aligned with the first line of the list item

Expected would be an alignment similar to browsers, where the marker uses baseline alignment with the first line of text.

Example html snippet

<p><strong>Bullets</strong></p>
<ul>
  <li><p>TODO 1</p>
    <ul>
      <li><p>Sub TODO 1a<br>with a second<br>and third line</p></li>
      <li><p>Sub <strong><span style="color:#d93f0b;">TODO</span></strong><span style="color:#d93f0b;"> </span>1b</p>
        <ul>
          <li><p>1ba</p></li>
        </ul>
      </li>
      <li><p>Sub TODO 1c</p></li>
    </ul>
  </li>
  <li><p>TODO 2</p></li>
  <li><p>final point</p></li>
</ul>

with 9.7.1 results in:
Image

with 9.7.2 results in:
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions