Closed jsong-eq closed 9 months ago
Is there a chance you could create a reproducible example e.g. on CodeSandbox?
https://codesandbox.io/s/pdf-js-createobjecturl-forked-ktlxkg?file=/src/App.js:0-2337
Is the closest I could get - but having trouble getting blob url working on codesandbox. Do you maybe have an example lying around that should work with blob URLs? If so, I should be able to quickly patch it in above ^
Thanks for checking the issue!
Just on looking onto more - TextLayer is failing on blob pdf.
Is the error I get, will update if I learn some more.
I'm actually suspecting that TextLayer gets lost during PDF file -> bytestream -> blob -> react-pdf process, but not sure how I can prove
"TextLayer task cancelled" sounds to me like something caused the TextLayer to update mid-render. Now, what could it be... 🤔
Yeah I doubt that this is actually a problem from the library itself - mb! At least until I can prove that the issues is from the react-pdf - I'll close this out. Thanks
Before you start - checklist
Description
Hi, I read up docs and the recipes for text highlight.
I'm on version
"react-pdf": "^7.3.3",
I'm using highlight text recipe as-is. It works if I test with a local pdf file - as
text highlighting works. However, I'm rendering with url generated from blob - I do not see the text customTextRenderer called at all.
I have tried highlight recipe on local pdf - that works great. However, trying to use customTextRenderer on a return pdf blob like above, customTextRender is not called.
Steps to reproduce
Expected behavior
CustomTextRenderer should be called
Actual behavior
CustomTextRenderer is ignored on Page component.
Additional information
Is sample screenshot to show pdf blob.
Environment