Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few things you can try to prevent this issue:

  1. Increase the pageBuffer value: By default, the pageBuffer is set to five, which means that react-pdf will preload five pages ahead of the current page. Increasing the pageBuffer value may help prevent the issue of the same page continuously displaying.

  2. Use a different rendering mode: By default, react-pdf uses "canvas" rendering mode. You can try using "svg" or "none" rendering mode instead, as they may provide a better rendering performance and prevent the issue.

  3. Optimize your PDF files: If your PDF files are large or contain complex graphics, it may cause slow rendering and display issues. Try optimizing your PDF files by reducing the file size, compressing images, or removing unnecessary elements.

  4. Check for browser compatibility issues: Some browsers may have compatibility issues with react-pdf. Try testing your app on different browsers to see if the issue persists.

  5. Use virtualization: If you have many pages to display, try using virtualization to only render the visible pages. This can improve performance and prevent the issue of the same page continuously displaying.