mikecousins/react-pdf-js

Rapidly changing pages causes the pdf to render incorrectly

Closed this issue · 0 comments

This seems to only occur when the page is changed before the previous page has finished rendering. Happens fairly easily on mobile (or performance throttled browser) with pdfs that render quite slowly.

See this gif for a recording of the behaviour
https://i.imgur.com/DMza2zy.gif

This behaviour is accompanied by the following console error
Error: Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.