-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress of pdf creation #837
Comments
I'd like this feature as well and have been looking at implementing it. The idea is to allow passing a In If this sounds like a good idea I'd be happy to do a pull request. |
Merged PR #851 |
@lachok are you using this in the browser or server? I'm trying to use this server side and posting the progress to an external store (redis in this case) and it seems that the actual building of the pdf is all cpu bound so none of my I/O to redis gets processed until everything is done. In other words, I have a progress bar that goes directly from 0 to 100. Any ideas? |
@darrinholst I've been trying to add a progress bar at client side (bootstrap) to pdfmake, but got the same issue you report. I've tried different sleep techniques inside the progressCallback function to try to let angular update the DOM, but no use. Also if I update the $scope var that holds the percentage only at 10% intervals (using $apply accordingly), to avoid too many $scope updates it still doesnt work. But if I hit a breakpoint each time the $scope is updated, then the progress bar updates by 10%. So the problem seems to be about what threads need to be suspended and how. Any ideas I could try? |
I looked at it for a few hours and couldn't find a solution. I'm thinking the problem is in pdfkit, not here, but I don't know for sure. It would be nice to have this work. Possibly related - foliojs/pdfkit#269? |
I'm searching for a generic progress callback in pdfmake which gets the current progress while the pdf generation (in percentage). Then an application can show a progress bar of pdf creation. Such a user feedback is really required if you create huge pdf documents.
The text was updated successfully, but these errors were encountered: