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

Page 15 does not render with the new release

Open theakashanand opened this issue 5 years ago • 8 comments

Certain pages (page 15 in the online example) do not render after updating to PDFJS v2.6.347

theakashanand avatar Sep 18 '20 17:09 theakashanand

browser? The online example renders correctly for me?

jsg2021 avatar Sep 18 '20 17:09 jsg2021

Screenshot 2020-09-20 at 5 15 05 PM

theakashanand avatar Sep 20 '20 11:09 theakashanand

Am using Chrome 85.0.4183.102. The pages render initially, but after making a few highlights and scrolling around the pages fail to render

theakashanand avatar Sep 20 '20 11:09 theakashanand

Yes, I am having the same issue on Brave Version 1.7.98, Chromium: 81.0.4044.113 (tried on Mozilla as well and received the same error). After scrolling a little bit faster, random pages stop rendering.

filipbasara0 avatar Sep 21 '20 06:09 filipbasara0

This appears to be a pdfjs issue not one for this library.

jsg2021 avatar Sep 22 '20 16:09 jsg2021

When I had initially discovered this error, I thought it arose because there were issues with the new version of PDFjs. However, after diving in deeper, the issue does not seem like it can be attributed to PDFjs. I have a feeling that certain rendering tasks may be getting cancelled due to the Worker thread. PDFjs is able to successfully render the same pages when the worker is not created (when the app runs with a fakeWorker on the Main thread itself). Is there any particular reason the worker is being initiated with Port? Do look into this as it seems to be an issue with how the worker is being configured, and not with the pdfjs library itself.

theakashanand avatar Nov 20 '20 09:11 theakashanand

Is there any particular reason the worker is being initiated with Port?

Port is the Worker instance. Giving pdf.js communication lines to the worker and vice-versa. The setPdfWorker function attempts to set the correct config property depending on what you pass (a source url, a function, an instance etc)

jsg2021 avatar Nov 21 '20 01:11 jsg2021

Do look into this as it seems to be an issue with how the worker is being configured, and not with the pdfjs library itself.

I don't believe there is any configuration. The source is all that is being set.

jsg2021 avatar Nov 21 '20 02:11 jsg2021