Skip to content

extractText(): multi-column table rows merge into a single line/span, so findText() cannot match text in a wrapped cell #95

Description

@pavithran15897

Problem

In a multi-column table, all columns at the same row height are grouped into a single line (and a single span, when they share a font). If one cell's text wraps onto several lines, the other columns' text ends up spliced between its fragments, so the cell's text is never contiguous and findText() can't match it.

Example

A three-column table where the first cell wraps:

| Description              | Date       | Status   |
| Quarterly compliance     | 01/01/2024 | Complete |
| review for the northern  |            |          |
| region                   |            |          |

pageText.text gives:

Quarterly compliance 01/01/2024 Complete
review for the northern
region

So this returns []:

page.findText("Quarterly compliance review for the northern region");

Expected

The wrapped cell should be findable as one string — or line.spans should reflect the column boundaries, so the cell can be reassembled from the public API.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions