andytango / mupdf-js

📰 Yet another Webassembly PDF renderer for node and the browser
https://andytango.github.io/mupdf-js-demo/index.html
GNU Affero General Public License v3.0
176 stars 20 forks source link

Manual context management support #59

Open anthrax63 opened 1 year ago

anthrax63 commented 1 year ago

By default, mupdf-js creates a MuPDF context upon initialization and uses it for all calls. However, since the context includes a cache, over time this can lead to an increase in the application's memory consumption. In this PR i've added support for manual context management.