k-yle / pdf-to-img

📃📸 Converts PDFs to images in nodejs
https://npm.im/pdf-to-img
MIT License
84 stars 22 forks source link

Use Workers as When converting a large pdf file it is taking a quite a lot of time #238

Open kotasudhakar opened 3 months ago

kotasudhakar commented 3 months ago

I think using multiple workers(worker threads in node or webworkers in browser) to render canvases using offscreen canvas (https://web.dev/articles/offscreen-canvas#use_with_popular_libraries) (https://web.dev/articles/offscreen-canvas) actually increases the speed exponentially as rendering/drawing these canvas actually taking a lot time

But i think using the latest beta build of canvas 3.0 is more important than this tbh https://github.com/k-yle/pdf-to-img/issues/228