pdfjs/web/viewer.js
function pdfViewClose() {
          var errorWrapper = this.appConfig.errorWrapper.container;
          errorWrapper.setAttribute('hidden', 'true');
          if (!this.pdfLoadingTask) {
            return Promise.resolve();
          }
          var promise = this.pdfLoadingTask.destroy();
          this.pdfLoadingTask = null;
          if (this.pdfDocument) {
            this.pdfDocument = null;
            this.pdfThumbnailViewer.setDocument(null);
            this.pdfViewer.setDocument(null);
            this.pdfLinkService.setDocument(null, null);
          }
          this.store = null;
          this.isInitialViewSet = false;
          this.pdfSidebar.reset();
          this.pdfOutlineViewer.reset();
          this.pdfAttachmentViewer.reset();
          this.findController.reset();
          this.findBar.reset();
          if (typeof PDFBug !== 'undefined') {
            PDFBug.cleanup();
          }
          return promise;
        }
function pdfViewClose() {
          var errorWrapper = this.appConfig.errorWrapper.container;
          errorWrapper.setAttribute('hidden', 'true');
          if (!this.pdfLoadingTask) {
            return Promise.resolve();
          }
          var promise = this.pdfLoadingTask.destroy();
          this.pdfLoadingTask = null;
          if (this.pdfDocument) {
            this.pdfDocument = null;
            this.pdfThumbnailViewer.setDocument(null);
            this.pdfViewer.setDocument(null);
            this.pdfLinkService.setDocument(null, null);
          }
          this.store = null;
          this.isInitialViewSet = false;
          this.pdfSidebar.reset();
          this.pdfOutlineViewer.reset();
          this.pdfAttachmentViewer.reset();
          this.findController.reset();
          this.findBar.reset();
          if (typeof PDFBug !== 'undefined') {
            PDFBug.cleanup();
          }
          return promise;
        }
function pdfViewClose ( ) { var errorWrapper = this . appConfig . errorWrapper . container ; errorWrapper . setAttribute ( 'hidden' , 'true' ) ; if ( ! this . pdfLoadingTask ) { return Promise . resolve ( ) ; } var promise = this . pdfLoadingTask . destroy ( ) ; this . pdfLoadingTask = null ; if ( this . pdfDocument ) { this . pdfDocument = null ; this . pdfThumbnailViewer . setDocument ( null ) ; this . pdfViewer . setDocument ( null ) ; this . pdfLinkService . setDocument ( null , null ) ; } this . store = null ; this . isInitialViewSet = false ; this . pdfSidebar . reset ( ) ; this . pdfOutlineViewer . reset ( ) ; this . pdfAttachmentViewer . reset ( ) ; this . findController . reset ( ) ; this . findBar . reset ( ) ; if ( typeof PDFBug !== 'undefined' ) { PDFBug . cleanup ( ) ; } return promise ; }
Closes opened PDF document.
@returns {Promise} - Returns the promise, which is resolved when all
destruction is completed.
Closes opened PDF document .