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

[2.8.0 pdfx] Flickering/Flashing of PDF Viewer on Page Load #535

Open
LouisHeinrichAS opened this issue Sep 27, 2024 · 2 comments
Open

[2.8.0 pdfx] Flickering/Flashing of PDF Viewer on Page Load #535

LouisHeinrichAS opened this issue Sep 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@LouisHeinrichAS
Copy link

Describe the bug
When using the PdfViewPinch widget to display a PDF document (using Uint8List), there is a noticeable flickering or flashing effect when scrolling through the document. This occurs even after the page is fully loaded, causing a disruptive user experience when displaying on the web.

To Reproduce
Load a PDF document using PdfViewPinch with a PdfControllerPinch to manage the document.
Observe the behavior during the page load. The PDF viewer flickers or flashes when displayed on web.

FutureOr<Uint8List> data; // bodyBytes from http response

final pdfPinchController = PdfControllerPinch(
  document: PdfDocument.openData(data),
);

PdfViewPinch(
  controller: pdfPinchController,
  builders: PdfViewPinchBuilders<DefaultBuilderOptions>(
    options: const DefaultBuilderOptions(),
    documentLoaderBuilder: (_) => const Center(child: CircularProgressIndicator()),
    pageLoaderBuilder: (_) => const Center(child: CircularProgressIndicator()),
    errorBuilder: (_, error) {
      return const Center(child: Text(Strings.fileViewError));
    },
  ),
);

Expected behavior
Once the page is fully loaded, it should remain stable without any flickering or flashing when scrolling through the document.

Screenshots
N/A

Environment:

  • Device: GalaxyBook3 360
  • OS: Fedora Linux 40
  • Version: pdfx: ^2.8.0
  • Web App tested with GoogleChrome (129.0.6668.58)
@LouisHeinrichAS LouisHeinrichAS added the bug Something isn't working label Sep 27, 2024
@LouisHeinrichAS LouisHeinrichAS changed the title Flickering/Flashing of PDF Viewer on Page Load [2.8.0 pdfx] Flickering/Flashing of PDF Viewer on Page Load Sep 27, 2024
@ifuterman
Copy link

The same. It's a blocker for me. But the library doesn't seem to be supported.

@kashiflab
Copy link

I'm also facing the same issue, Does anyone have a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants