react-hooks-worker icon indicating copy to clipboard operation
react-hooks-worker copied to clipboard

pdf generation in background thread

Open mahamedh opened this issue 3 years ago • 6 comments

is it possible to generate pdf using worker

mahamedh avatar May 26 '22 15:05 mahamedh

probably? what's the pdf generation library in your mind?

dai-shi avatar May 26 '22 15:05 dai-shi

probably? what's the pdf generation library in your mind?

yes i am using jspdf library in react web development, i am leading some latency when generating pdf,to provide good user experinece for the user i need to run the pdf generation in background....

mahamedh avatar May 27 '22 03:05 mahamedh

Uncaught (in promise) ReferenceError: document is not defined i have tried jspdf pdf generation using react hooks worker i am facing above error @dai-shi

mahamedh avatar May 27 '22 09:05 mahamedh

document is not defined

Ah, this means the library doesn't support running in web workers.

dai-shi avatar May 27 '22 10:05 dai-shi

@dai-shi thanks for update save my time, any pdf gneration library developed on top web workers?

mahamedh avatar May 28 '22 12:05 mahamedh

Hmm, no, I don't know. https://www.npmjs.com/search?q=pdf%20generation Maybe you want to find something that works both nodejs and browser.

dai-shi avatar May 28 '22 12:05 dai-shi