html2pdf.js icon indicating copy to clipboard operation
html2pdf.js copied to clipboard

The html2pdf processing freezes the UI

Open lone-cloud opened this issue 7 years ago • 7 comments

Not sure if it's specific to my implementation, but I've noticed that the running html2pdf completely freezes the UI. Perhaps this can be fixed by running the conversions in a separate thread via service workers. Would be great if this lib did it so I don't have to implement it myself. ;)

Great job making this btw. I'm on the pdf-callback branch and it's a good addition. Just curious for the reason to not merge it into master?

lone-cloud avatar Aug 18 '17 18:08 lone-cloud

Hey @hoboman313, really sorry I didn't respond sooner. I like the idea about service workers, I don't have any experience in that though - if you do implement something, please share it and I'll try to merge it in!

Regarding the pdf-callback branch, it's not merged in because I've been planning a bigger change to the API that will give more control over all the steps of the process. With that change, pdf-callback will no longer be necessary - it's just a matter of finding the time. I recently took on a new job and I haven't had a chance to devote any time to coding, unfortunately! Soon... soon.

eKoopmans avatar Aug 31 '17 10:08 eKoopmans

@hoboman313 Finally how you solved this issue? I am facing the same issue my PDF is 16 to 25 pages long

webmarts avatar Dec 18 '17 08:12 webmarts

Hi, I have just pushed a new branch, new-api, which is ready for testing! The readme has all the information on the new API. Please let me know if there are any problems with it - I want to make sure it's stable before merging into master!

This doesn't resolve the issue of freezing the UI or service workers, but addresses @hoboman313's other question about the pdf-callback branch.

eKoopmans avatar Feb 24 '18 15:02 eKoopmans

Hey guys, I'm currently using the new-api branch, and I'm facing the same freezing issue. I'll need to fix that soon.

@eKoopmans should I do a fork and implement the change on my side or are you open to pull request? It would be awesome to merge this feature into new-api branch.

kevinpiac avatar Apr 25 '18 12:04 kevinpiac

Hi @kevinpiac, I haven't had much time to maintain this project, but if you did develop an improvement then absolutely submit a PR and I'll have a look. Thanks!

eKoopmans avatar Jan 19 '19 07:01 eKoopmans

Hello, has this been solved yet? or is there any work around ?

christyantoun avatar Apr 27 '22 13:04 christyantoun

Hello, has this been solved yet? or is there any work around ?

Hello, did you solve this?

mishinalex avatar Jun 20 '22 13:06 mishinalex