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

Fromat exception while scrolling #2202

Open
AnaghaSpreit opened this issue Dec 13, 2024 · 1 comment
Open

Fromat exception while scrolling #2202

AnaghaSpreit opened this issue Dec 13, 2024 · 1 comment
Labels
open Open pdf PDF component

Comments

@AnaghaSpreit
Copy link

Bug description

While scrolling the pdf ,it is taking time to scroll
A format exception throwing in stacktrace

Steps to reproduce

Use this library to render pdf with arabic font

Code sample

Code sample
 SfPdfViewer.memory(_pdfData as Uint8List));```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

</details>

https://github.com/user-attachments/assets/db12c8ea-7f34-4950-a041-b9df2858937e




### Stack Traces

<details open><summary>Stack Traces</summary>

```dart
======= Exception caught by gesture library =======================================================
The following FormatException was thrown while dispatching a pointer event:
FormatException

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 296:3                                         throw_
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 215:5                                                   parse
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/font_structure.dart 1398:64     getCharacterMapTable
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/font_structure.dart 188:30      get characterMapTable
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/font_structure.dart 4734:31     getHexaDecimalString
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/font_structure.dart 2898:29     decodeTextExtractionTJ
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/image_renderer.dart 768:22      [_renderTextElementWithSpacing]
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/image_renderer.dart 376:17      renderAsImage
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/pdf_text_extractor.dart 346:13  [_getTextLine]
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/pdf_text_extractor.dart 212:14  [_extractTextLines]
packages/syncfusion_flutter_pdf/src/pdf/implementation/exporting/pdf_text_extractor/pdf_text_extractor.dart 131:12  extractTextLines
packages/syncfusion_flutter_pdfviewer/src/control/pdfviewer_canvas.dart 1742:63                                     findTextWhileHover
packages/syncfusion_flutter_pdfviewer/src/control/pdf_page_view.dart 636:49                                         <fn>
packages/flutter/src/widgets/framework.dart 1203:30                                                                 setState
packages/syncfusion_flutter_pdfviewer/src/control/pdf_page_view.dart 629:23                                         <fn>
packages/flutter/src/rendering/proxy_box.dart 3170:14                                                               handleEvent
packages/flutter/src/gestures/binding.dart 481:14                                                                   dispatchEvent
packages/flutter/src/rendering/binding.dart 450:11                                                                  dispatchEvent
packages/flutter/src/gestures/binding.dart 426:7                                                                    [_handlePointerEventImmediately]
packages/flutter/src/gestures/binding.dart 389:5                                                                    handlePointerEvent
packages/flutter/src/gestures/binding.dart 336:7                                                                    [_flushPointerEventQueue]
packages/flutter/src/gestures/binding.dart 305:9                                                                    [_handlePointerDataPacket]
lib/_engine/engine/platform_dispatcher.dart 1423:5                                                                  invoke1
lib/_engine/engine/platform_dispatcher.dart 336:5                                                                   invokeOnPointerDataPacket
lib/_engine/engine/pointer_binding.dart 405:30                                                                      [_sendToFramework]
lib/_engine/engine/pointer_binding.dart 225:7                                                                       onPointerData
lib/_engine/engine/pointer_binding.dart 1012:16                                                                     <fn>
lib/_engine/engine/pointer_binding.dart 948:7                                                                       <fn>
lib/_engine/engine/pointer_binding.dart 541:9                                                                       loggedHandler
dart-sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart 188:27                                      _callDartFunctionFast1
Event: PointerHoverEvent#d692a(position: Offset(849.2, 564.7))
  position: Offset(849.2, 564.7)
Target: RenderMouseRegion#db496 relayoutBoundary=up5
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=1228.8, 0.0<=h<=Infinity)
  size: Size(1228.8, 1736.9)
  behavior: opaque
  listeners: hover
  cursor: SystemMouseCursor(basic)```

</details>


### On which target platforms have you observed this bug?

Android, Web

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version
    10.0.22631.4602], locale en-IN)
    • Flutter version 3.24.5 on channel stable at
      C:\Users\Anagha\Documents\flutter
    • Upstream repository https://github.com/flutter/flutter.gitFramework revision dec2ee5c1f (4 weeks ago), 2024-11-13 11:13:06 -0800Engine revision a18df97ca5
    • Dart version 3.5.4DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version
    34.0.0)
    • Android SDK at C:\Users\Anagha\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0Java binary at: C:\Program Files\Java\jdk-17\bin\java
    • Java version OpenJDK Runtime Environment OpenLogic-OpenJDK (build
      17.0.13+11-adhoc..jdk17u)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows     
      apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including 
      all of its default components

[√] Android Studio (version 2024.2)
    • Android Studio at C:\Program Files\Android\Android StudioFlutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutterDart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dartJava version OpenJDK Runtime Environment (build
      21.0.3+-12282718-b509.11)

[√] VS Code (version 1.95.3)
    • VS Code at C:\Users\Anagha\AppData\Local\Programs\Microsoft VS CodeFlutter extension version 3.100.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows      
      [Version 10.0.22631.4602]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome
      131.0.6778.110Edge (web)        • edge    • web-javascript • Microsoft Edge
      131.0.2903.86

[√] Network resources
    • All expected network resources are available.
@LavanyaGowtham2021 LavanyaGowtham2021 added pdf PDF component open Open labels Dec 16, 2024
@immankumarsync
Copy link
Contributor

immankumarsync commented Dec 16, 2024

Hi @AnaghaSpreit,
We suspect that this issue might be specific to particular document. Could you please share the PDF document in which issue occurs? This will be helpful for us to analyze more on this issue and provide you a prompt solution at the earliest.

If you feel the document should not be shared publicly here, you can create a ticket in our support portal and share the details there. We will check and revert soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open Open pdf PDF component
Projects
None yet
Development

No branches or pull requests

3 participants