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

PageText toString sometimes empty although getPageLines is not empty #359

Closed
gtache opened this issue Jun 12, 2024 · 1 comment · Fixed by #360
Closed

PageText toString sometimes empty although getPageLines is not empty #359

gtache opened this issue Jun 12, 2024 · 1 comment · Fixed by #360

Comments

@gtache
Copy link
Contributor

gtache commented Jun 12, 2024

Apparently, pageLines can be empty while getPageLines manages to retrieve the lines (therefore sortedLines and/or optionalPageLines are filled).
A simple fix would be to use getPageLines in toString. It would also arguably be more correct given that we could expect the string to be sorted.
The other methods using pageLines (applyTextTransform, clearSelected, etc) still work with an empty pageLines given that they also use sortedLines and optionalPageLines.

@pcorless
Copy link
Owner

This fix seems reasonable.

pcorless pushed a commit that referenced this issue Jun 13, 2024
Co-authored-by: Guillaume Tâche <tga@bger.ch>
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 a pull request may close this issue.

2 participants