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: PDFTron SDK Tech Review | Nov 29, 2022 at 2 pm ET


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use