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

Page rendering delay on high resolution pages #1063

Closed
4 tasks done
MuthuChess opened this issue Oct 10, 2022 · 5 comments
Closed
4 tasks done

Page rendering delay on high resolution pages #1063

MuthuChess opened this issue Oct 10, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@MuthuChess
Copy link

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

My PDF has some high resolution images where the page load is successful but takes few seconds to render the image on to the screen. Until then, there is a white blank page.

There is an attribute loading to show message while loading

It would be great if there is an rendering attribute to display a message when rendering in progress (between loading success and render success).

Steps to reproduce

  1. Open a PDF with high resolution images
  2. The page render will be delayed and a blank screen is displayed

Expected behavior

To provide an option to display some text so that the user is aware of something is happening

Actual behavior

It just displays a blank screen where is user is not aware if something is happening or if it is a blank page

Additional information

No response

Environment

  • Browser (if applicable): Chrome 105.0.5195.128
  • React-PDF version: 5.7.2
  • React version: 16.8.6
  • Webpack version (if applicable): CRA
@MuthuChess MuthuChess added the bug Something isn't working label Oct 10, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Jan 9, 2023
@IshmeetSingh06
Copy link

IshmeetSingh06 commented Jan 18, 2023

Hello @MuthuChess were you able to solve this issue?
I am having the same issue with high quality images inside the pdf not sure what to do as i have multiple pdf's which i want to show
@wojtekmaj is there any way we can add a loading animation to wait for the images to load?

@github-actions github-actions bot removed the stale label Jan 23, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Apr 24, 2023
@wojtekmaj
Copy link
Owner

There cannot be a rendering placeholder like we have for loading and error, because after the page is loaded, canvas is mounted for pdf.js to paint on. What you can do, however, is to place your own loader on top, and listen to onRenderSuccess to hide it.

@github-actions github-actions bot removed the stale label May 1, 2023
@wojtekmaj
Copy link
Owner

See #1149 (comment) for more info on how you can, at least to some extend, improve performance of rendering big PDFs on high resolution screens.

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

3 participants