You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When selecting text in a PDF using the syncfusion_flutter_pdfviewer package, the app throws the following error and sometimes crashes:
This occurs during text selection—often when dragging across multiple lines or pages. It appears to be a RangeError, likely caused by incorrect indexing when calculating selection ranges.
We are able to replicate the Range error when extracting text lines from the PDF page. Currently, we are validating this issue, and we will update further details once it is completed
We confirmed the issue "Range Error exception in extractTextLines API" as a defect in our product and we will include the fix in the upcoming weekly release, which will be available on May 20, 2025.
Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization."
Bug description
When selecting text in a PDF using the syncfusion_flutter_pdfviewer package, the app throws the following error and sometimes crashes:
This occurs during text selection—often when dragging across multiple lines or pages. It appears to be a RangeError, likely caused by incorrect indexing when calculating selection ranges.
Attached PDF file
Steps to reproduce
1.Open a PDF using SfPdfViewer.asset() (or SfPdfViewer.network()).
2.Long-press on a word to start text selection.
3.Drag to extend the selection across multiple lines or to the end of a page.
4.Observe that the app crashes or throws the error
Code sample
Screenshots or Video
Stack Traces
Stack Traces
On which target platforms have you observed this bug?
Android, iOS
Flutter Doctor output
Doctor output
[Add your output here]
The text was updated successfully, but these errors were encountered: