|
@@ -377,6 +377,7 @@ class ComPDFKitViewer {
|
|
// });
|
|
// });
|
|
})
|
|
})
|
|
await this.load(pdfDocument);
|
|
await this.load(pdfDocument);
|
|
|
|
+ this.search('PDF')
|
|
return { pwd: !!this.#pwd };
|
|
return { pwd: !!this.#pwd };
|
|
},
|
|
},
|
|
reason => {
|
|
reason => {
|
|
@@ -840,7 +841,6 @@ class ComPDFKitViewer {
|
|
eventBus._on("switchannotationeditormode", this.webViewerSwitchAnnotationEditorMode.bind(this));
|
|
eventBus._on("switchannotationeditormode", this.webViewerSwitchAnnotationEditorMode.bind(this));
|
|
eventBus._on("annotationsCountChanged", this.webViewerAnnotationsCountChanged.bind(this))
|
|
eventBus._on("annotationsCountChanged", this.webViewerAnnotationsCountChanged.bind(this))
|
|
eventBus._on("distanceChanged", this.webViewerDistanceChanged.bind(this));
|
|
eventBus._on("distanceChanged", this.webViewerDistanceChanged.bind(this));
|
|
- eventBus._on("search", this.webViewerSearch.bind(this));
|
|
|
|
|
|
|
|
eventBus._on("annotationChange", this.handleAnnotationChange.bind(this));
|
|
eventBus._on("annotationChange", this.handleAnnotationChange.bind(this));
|
|
eventBus._on("createSignature", this.handleCreateSignature.bind(this));
|
|
eventBus._on("createSignature", this.handleCreateSignature.bind(this));
|
|
@@ -912,10 +912,6 @@ class ComPDFKitViewer {
|
|
this._pdfId = null
|
|
this._pdfId = null
|
|
this.annotations = null
|
|
this.annotations = null
|
|
|
|
|
|
- if (this.findBar && this.findBar.opened) {
|
|
|
|
- this.findBar.close();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
await Promise.all(promises);
|
|
await Promise.all(promises);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1034,10 +1030,6 @@ class ComPDFKitViewer {
|
|
this.addAnnotations(data)
|
|
this.addAnnotations(data)
|
|
}
|
|
}
|
|
|
|
|
|
- webViewerSearch(value) {
|
|
|
|
- this.findBar?.dispatchEvent("", false, value)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
webViewerDistanceChanged(evt) {
|
|
webViewerDistanceChanged(evt) {
|
|
this.distanceChangedCallback(evt.distance)
|
|
this.distanceChangedCallback(evt.distance)
|
|
}
|
|
}
|
|
@@ -1258,23 +1250,6 @@ class ComPDFKitViewer {
|
|
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
|
|
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
|
|
}
|
|
}
|
|
|
|
|
|
- this.findBar = new PDFFindBar({
|
|
|
|
- bar: document.getElementById("findbar"),
|
|
|
|
- toggleButton: document.getElementById("viewFind"),
|
|
|
|
- findField: document.getElementById("findInput"),
|
|
|
|
- emptyInput: document.getElementById("emptyInput"),
|
|
|
|
- highlightAllCheckbox: document.getElementById("findHighlightAll"),
|
|
|
|
- caseSensitiveCheckbox: document.getElementById("findMatchCase"),
|
|
|
|
- matchDiacriticsCheckbox: document.getElementById("findMatchDiacritics"),
|
|
|
|
- entireWordCheckbox: document.getElementById("findEntireWord"),
|
|
|
|
- findMsg: document.getElementById("findMsg"),
|
|
|
|
- findResultsCount: document.getElementById("findResultsCount"),
|
|
|
|
- findPreviousButton: document.getElementById("findPrevious"),
|
|
|
|
- findNextButton: document.getElementById("findNext"),
|
|
|
|
- findbarView,
|
|
|
|
- $t: this.$t
|
|
|
|
- }, this.eventBus);
|
|
|
|
-
|
|
|
|
this.pdfCursorTools = new PDFCursorTools({
|
|
this.pdfCursorTools = new PDFCursorTools({
|
|
container,
|
|
container,
|
|
eventBus: this.eventBus,
|
|
eventBus: this.eventBus,
|
|
@@ -1609,30 +1584,6 @@ class ComPDFKitViewer {
|
|
this.appConfig.toolbar.pageNumber.select();
|
|
this.appConfig.toolbar.pageNumber.select();
|
|
break;
|
|
break;
|
|
|
|
|
|
- case "Find":
|
|
|
|
- if (!this.supportsIntegratedFind) {
|
|
|
|
- if (!evt.close || (evt.close && evt.close === 4 && this.findBar.opened)) {
|
|
|
|
- this.findBar.toggle();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case "FindOpen":
|
|
|
|
- if (!this.supportsIntegratedFind) {
|
|
|
|
- if (!evt.close || (evt.close && evt.close === 4 && this.findBar.opened)) {
|
|
|
|
- this.findBar.open();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case "FindClose":
|
|
|
|
- if (!this.supportsIntegratedFind) {
|
|
|
|
- if (!evt.close || (evt.close && evt.close === 4 && this.findBar.opened)) {
|
|
|
|
- this.findBar.close();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
case "Print":
|
|
case "Print":
|
|
const url = await this.download(false, null, 3)
|
|
const url = await this.download(false, null, 3)
|
|
this.triggerPrinting(url);
|
|
this.triggerPrinting(url);
|