1
1
diff --git a/../web/viewer.js b/../viewer/viewer.js
2
- index 5cdd7d2b..fbbf8403 100644
2
+ index 2043b5a4..eadaa52e 100644
3
3
--- a/../web/viewer.js
4
4
+++ b/../viewer/viewer.js
5
5
@@ -43,10 +43,10 @@ const GenericCom = {};
@@ -15,7 +15,7 @@ index 5cdd7d2b..fbbf8403 100644
15
15
}
16
16
}
17
17
class GenericExternalServices extends _app.DefaultExternalServices {
18
- @@ -686 ,7 +686 ,7 @@ const PDFViewerApplication = {
18
+ @@ -683 ,7 +683 ,7 @@ const PDFViewerApplication = {
19
19
title = url;
20
20
}
21
21
}
@@ -24,7 +24,7 @@ index 5cdd7d2b..fbbf8403 100644
24
24
},
25
25
setTitle(title = this._title) {
26
26
this._title = title;
27
- @@ -1160 ,7 +1160 ,7 @@ const PDFViewerApplication = {
27
+ @@ -1152 ,7 +1152 ,7 @@ const PDFViewerApplication = {
28
28
this.metadata = metadata;
29
29
this._contentDispositionFilename ??= contentDispositionFilename;
30
30
this._contentLength ??= contentLength;
@@ -33,16 +33,7 @@ index 5cdd7d2b..fbbf8403 100644
33
33
let pdfTitle = info.Title;
34
34
const metadataTitle = metadata?.get("dc:title");
35
35
if (metadataTitle) {
36
- @@ -2984,7 +2984,7 @@ let pdfjsLib;
37
- if (typeof window !== "undefined" && window["pdfjs-dist/build/pdf"]) {
38
- pdfjsLib = window["pdfjs-dist/build/pdf"];
39
- } else {
40
- - pdfjsLib = require("../build/pdf.js");
41
- + pdfjsLib = require("./build/pdf.js");
42
- }
43
- module.exports = pdfjsLib;
44
-
45
- @@ -3197,7 +3197,7 @@ const defaultOptions = {
36
+ @@ -3184,7 +3184,7 @@ const defaultOptions = {
46
37
kind: OptionKind.WORKER
47
38
},
48
39
workerSrc: {
@@ -51,7 +42,7 @@ index 5cdd7d2b..fbbf8403 100644
51
42
kind: OptionKind.WORKER
52
43
}
53
44
};
54
- @@ -4904 ,7 +4904 ,7 @@ const FindState = {
45
+ @@ -5155 ,7 +5155 ,7 @@ const FindState = {
55
46
};
56
47
exports.FindState = FindState;
57
48
const FIND_TIMEOUT = 250;
@@ -60,7 +51,7 @@ index 5cdd7d2b..fbbf8403 100644
60
51
const MATCH_SCROLL_OFFSET_LEFT = -400;
61
52
const CHARACTERS_TO_NORMALIZE = {
62
53
"\u2010": "-",
63
- @@ -7483 ,7 +7483 ,7 @@ class PDFSidebar {
54
+ @@ -7755 ,7 +7755 ,7 @@ class PDFSidebar {
64
55
this.#dispatchEvent();
65
56
return;
66
57
}
@@ -69,16 +60,16 @@ index 5cdd7d2b..fbbf8403 100644
69
60
if (!this.isInitialEventDispatched) {
70
61
this.#dispatchEvent();
71
62
}
72
- @@ -8381 ,7 +8381 ,7 @@ class PDFViewer {
63
+ @@ -8655 ,7 +8655 ,7 @@ class PDFViewer {
73
64
this.#annotationEditorMode = options.annotationEditorMode ?? _pdfjsLib.AnnotationEditorType.NONE;
74
65
this.imageResourcesPath = options.imageResourcesPath || "";
75
66
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
76
67
- this.removePageBorders = options.removePageBorders || false;
77
68
+ this.removePageBorders = options.removePageBorders || true;
78
- this.useOnlyCssZoom = options.useOnlyCssZoom || false;
79
- this.isOffscreenCanvasSupported = options.isOffscreenCanvasSupported ?? true ;
80
- this.maxCanvasPixels = options.maxCanvasPixels;
81
- @@ -12204 ,10 +12204 ,10 @@ class ViewHistory {
69
+ if ( options.useOnlyCssZoom) {
70
+ console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.") ;
71
+ options.maxCanvasPixels = 0 ;
72
+ @@ -12516 ,10 +12516 ,10 @@ class ViewHistory {
82
73
}
83
74
async _writeToStorage() {
84
75
const databaseStr = JSON.stringify(this.database);
@@ -91,7 +82,7 @@ index 5cdd7d2b..fbbf8403 100644
91
82
}
92
83
async set(name, val) {
93
84
await this._initializedPromise;
94
- @@ -13055 ,7 +13055 ,7 @@ document.webL10n = function (window, document) {
85
+ @@ -13365 ,7 +13365 ,7 @@ document.webL10n = function (window, document) {
95
86
function getL10nData(key, args, fallback) {
96
87
var data = gL10nData[key];
97
88
if (!data) {
@@ -100,7 +91,7 @@ index 5cdd7d2b..fbbf8403 100644
100
91
if (!fallback) {
101
92
return null;
102
93
}
103
- @@ -13491 ,6 +13491 ,9 @@ function renderProgress(index, total, l10n) {
94
+ @@ -13801 ,6 +13801 ,9 @@ function renderProgress(index, total, l10n) {
104
95
}
105
96
window.addEventListener("keydown", function (event) {
106
97
if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
@@ -110,7 +101,7 @@ index 5cdd7d2b..fbbf8403 100644
110
101
window.print();
111
102
event.preventDefault();
112
103
event.stopImmediatePropagation();
113
- @@ -13758 ,9 +13761 ,10 @@ function webViewerLoad() {
104
+ @@ -14079 ,9 +14082 ,10 @@ function webViewerLoad() {
114
105
}
115
106
});
116
107
try {
0 commit comments