react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

PDF generation freezes browser tab

Open xbrny opened this issue 1 year ago • 4 comments

Describe the bug PDF generation freezes browser tab

To Reproduce

  1. Open this react-pdf REPL
  2. Uncomment this line (8): // marginBottom: 32,

For now, I'm using paddingBottom instead of marginBottom as a workaround.

Expected behavior Should be able to generate and load the PDF

Screenshots

Note that the preview is greyed out due to being unresponsive:

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Microsoft Edge
  • React-pdf version: using REPL

xbrny avatar Aug 01 '24 06:08 xbrny

We also experience this issue with PDF generation. Our application runs in a linux environment, and the bug happens in both Chrome and Firefox. We use @react-pdf/renderer version 3.3.8

garmyhr avatar Aug 07 '24 08:08 garmyhr

I'm facing the same issue. the bug happens in chrome, safari and Firefox. version 4.3

DiegoSandovalV avatar May 23 '25 15:05 DiegoSandovalV

Users also complaining on freezing browser on 30+ page file generation.

renchix avatar Jun 27 '25 22:06 renchix

I'm also trying find a solution for this issue. I'm generating a PDF file with a Blob and encountering slowness at 30+ pages. Is the only workaround to generate the PDF with a Web Worker or server-side so the main thread isn't blocked?

kwalk2108 avatar Jun 30 '25 19:06 kwalk2108