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

[pdfx] some pdf files are really slow to render #516

Open
Arcturus5404 opened this issue Jul 9, 2024 · 0 comments
Open

[pdfx] some pdf files are really slow to render #516

Arcturus5404 opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Arcturus5404
Copy link

Arcturus5404 commented Jul 9, 2024

Describe the bug
Some PDF files are really slow to render images from. I have included a PDF that takes a really long time per page to render:
https://www.dropbox.com/scl/fi/hoo4fq0crfq6v4wcxg7g4/Kerstdeken-2022-met-kerstmis.pdf?rlkey=vp1zq12f4dsdm4k0d1jwqc741&st=quuyukt7&dl=0

To Reproduce
Steps to reproduce the behavior:

Open the PDF

  final document = await PdfDocument.openFile(file.path);
  var page = await document.getPage(1);

  var size = 5464;
  var width = ((page.width / page.height) * size);
  var height = size;

// The following step takes at least 20 to 30s to render
var pageImage = await page.render(
    width: width,
    format: PdfPageImageFormat.jpeg,
    height: height,
  );

Expected behavior
Fast render of the image, like how it was in version 2.5.0

For now I reverted back to the 2.5.0 with the Decoder issue fix, which does render the image quickly as opposed to the 2.6.0 release:

  pdfx: # See https://github.com/ScerIO/packages.flutter/issues/448 
    git:
      url: 'https://github.com/ScerIO/packages.flutter'
      ref: '4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b'

Smartphone (please complete the following information):

  • Device: iPhone14
  • OS: emulator 17.5.1

Additional context
It seemed to work in the past, so I think it has to do with the 2.6.0 upgrade

@Arcturus5404 Arcturus5404 added the bug Something isn't working label Jul 9, 2024
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

2 participants