Closing the document
|
<< Click to Display Table of Contents >> Navigation: Gnostice Document Studio .NET > Going Deeper > Document Viewing > ASP.NET > Displaying server-side documents > Closing the document |
When viewing a document present on the server, the file that is loaded on the server is kept open for serving the viewing requests. This should be closed when the viewing session is complete, by calling the closeDocument API on the client-side. The code snippet to accomplish this is shown below.
if (documentViewer.viewerManager != null) {
documentViewer.closeDocument(documentViewer.viewerManager.documentUri);
}
If the document URL is being stored in the cookies then it can be passed to the closeDocument API.