diff --git a/public/pdfjs/web/viewer.html b/public/pdfjs/web/viewer.html
index 5099dc37..591a663c 100644
--- a/public/pdfjs/web/viewer.html
+++ b/public/pdfjs/web/viewer.html
@@ -31,6 +31,11 @@ See https://github.com/adobe-type-tools/cmap-resources
+
@@ -38,7 +43,7 @@ See https://github.com/adobe-type-tools/cmap-resources
if (!window.frameElement) {
// 禁用F12
document.addEventListener('keydown', function(event) {
- if (event.key === 'F12' || event.keyCode === 123) {
+ if (event.key === 'F12' || event.keyCode === 123 || event.code === 'KeyS' || event.code === 'KeyP') {
event.preventDefault()
}
})
diff --git a/public/pdfjs/web/viewer.js b/public/pdfjs/web/viewer.js
index c48841f5..749ba505 100644
--- a/public/pdfjs/web/viewer.js
+++ b/public/pdfjs/web/viewer.js
@@ -788,9 +788,9 @@ const PDFViewerApplication = {
},
downloadOrSave() {
if (this.pdfDocument?.annotationStorage.size > 0) {
- this.save();
+ // this.save();
} else {
- this.download();
+ // this.download();
}
},
_documentError(message, moreInfo = null) {
@@ -1300,7 +1300,7 @@ const PDFViewerApplication = {
if (!this.supportsPrinting) {
return;
}
- window.print();
+ // window.print();
},
bindEvents() {
const {
@@ -1326,8 +1326,8 @@ const PDFViewerApplication = {
eventBus._on("presentationmode", webViewerPresentationMode);
eventBus._on("switchannotationeditormode", webViewerSwitchAnnotationEditorMode);
eventBus._on("switchannotationeditorparams", webViewerSwitchAnnotationEditorParams);
- eventBus._on("print", webViewerPrint);
- eventBus._on("download", webViewerDownload);
+ // eventBus._on("print", webViewerPrint);
+ // eventBus._on("download", webViewerDownload);
eventBus._on("firstpage", webViewerFirstPage);
eventBus._on("lastpage", webViewerLastPage);
eventBus._on("nextpage", webViewerNextPage);
@@ -1444,8 +1444,8 @@ const PDFViewerApplication = {
eventBus._off("namedaction", webViewerNamedAction);
eventBus._off("presentationmodechanged", webViewerPresentationModeChanged);
eventBus._off("presentationmode", webViewerPresentationMode);
- eventBus._off("print", webViewerPrint);
- eventBus._off("download", webViewerDownload);
+ // eventBus._off("print", webViewerPrint);
+ // eventBus._off("download", webViewerDownload);
eventBus._off("firstpage", webViewerFirstPage);
eventBus._off("lastpage", webViewerLastPage);
eventBus._off("nextpage", webViewerNextPage);
@@ -1844,7 +1844,7 @@ function webViewerPrint() {
PDFViewerApplication.triggerPrinting();
}
function webViewerDownload() {
- PDFViewerApplication.downloadOrSave();
+ // PDFViewerApplication.downloadOrSave();
}
function webViewerFirstPage() {
PDFViewerApplication.page = 1;
@@ -2242,11 +2242,11 @@ function webViewerKeyDown(evt) {
if (cmd === 1 || cmd === 8) {
switch (evt.keyCode) {
case 83:
- eventBus.dispatch("download", {
- source: window
- });
- handled = true;
- break;
+ // eventBus.dispatch("download", {
+ // source: window
+ // });
+ // handled = true;
+ // break;
case 79:
{
eventBus.dispatch("openfile", {
@@ -13627,7 +13627,8 @@ function renderProgress(index, total, l10n) {
}
window.addEventListener("keydown", function (event) {
if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
- window.print();
+ // window.print();
+ return false
event.preventDefault();
event.stopImmediatePropagation();
}
@@ -13706,7 +13707,7 @@ function getXfaHtmlForPrinting(printContainer, pdfDocument) {
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
-/******/
+/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
@@ -13720,14 +13721,14 @@ function getXfaHtmlForPrinting(printContainer, pdfDocument) {
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
-/******/
+/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
-/******/
+/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
-/******/
+/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
@@ -13911,4 +13912,4 @@ if (document.readyState === "interactive" || document.readyState === "complete")
/******/ })()
;
-//# sourceMappingURL=viewer.js.map
\ No newline at end of file
+//# sourceMappingURL=viewer.js.map