 }
        PDFViewerApplication._saveInProgress = true;
        await PDFViewerApplication.pdfScriptingManager.dispatchWillSave();

        try {
          const data = await PDFViewerApplication.pdfDocument.saveDocument();
          const updated_pdf = new Blob([data], {type: "application/pdf"});
          send_pdf_file(updated_pdf);
          PDFViewerApplication._hasAnnotationEditors = false;
          // removes "*" from the tab title in order to signal that the file was successfully saved
          PDF