dale
1
Using PDFJS Webviewer in React, what are some tips/best practices for managing memory when dealing with a single webviewer and multiple pdf documents.
Currently our memory usage grows with each document switch, even if returning to a document that had already been loaded.
kkim
3
Hi there,
We recommend using the loadDocument API to open every new document with the same instance.
Please see this guide for more details:
Best regards,
Kevin
dale
4
I’ve followed those where appropriate, but wondering how else to prevent memory from growing.
kkim
5
Hi there,
There is a dispose method under the UI namespace that you could try using, if it is not happening automatically:
best regards,
Kevin