Some test text!

Close a document

Is it necessary to close a document before loading another one?

The loadDocument API internally uses the closeDocument API to make sure that things such as DOM elements, event listeners and any other forms of memory consumers related to the current document will be cleaned up before loading another document. This means that there is no need to explicitly close a document beforing loading another one. However, you may want to call closeDocument to keep the memory usage low while still showing the UI if no documents should be loaded currently.

Get the answers you need: Support

Upcoming Webinar: How Developers Add Office Viewing Without Downloading | June 9th at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use