-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Cannot use the same canvas during multiple render() operations #10018
Comments
@atnsm bro can i know whether you're using PDF-annotate in Angular 2+? |
I do not think so. Here is the list of all dependencies: |
Same problem,how to fix this. |
Seeing the same error with the |
I would also say so. Let's close this and we can always reopen if the final 2.0 release is done and the problem remains. |
I run into the same problem. Help needed. |
Any updates on this issue ? |
I got this problems when i use pdfjs in angular 8. hope can help someone: public ngOnDestroy() { |
Any updates on this issue ? |
I'm having the same issue, using a single canvas to show the documents and the user can select one of multiple documents to show |
You should cancel then destroy render pdf process before you can render new pdf file |
Could someone explain the proper way to cancel and re-render the same page? From other issues I've seen, you shouldn't use the same canvas to run two render tasks at once. And you have to either wait for the previous one to finish (which I don't want to do) or cancel it. But calling @huannxdev 's solution also requires you to destroy the pdf. But I don't want to have to reload it just to re-render a single page. |
I am facing the same issue, version 3.9.179 |
Running into the issue now that React's strict mode wants to render our PDF component twice. Is this an issue with my implementation or this library? Thank you and any advice would be greatly appreciated! |
Sadly, I am having the same issue, i'm just glad someone is having the problem in 2023 and I'm not crazy |
Using latest pdfjs version (2.0.550) I get the following error:
Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.
The code I am using for rendering is as follow:
That part of the code is from annotation js project:
https://github.com/instructure/pdf-annotate.js/blob/master/docs/index.js
As you can also see every pages hast it own canvas. So, I don't know why I still get such error.
What is going wrong and where I need to look into?
The text was updated successfully, but these errors were encountered: