Skip to content

Commit

Permalink
Version 10.7.0
Browse files Browse the repository at this point in the history
- Update pdf.js to v4.9.124
  • Loading branch information
James-Yu committed Dec 3, 2024
1 parent b388880 commit c203bc1
Show file tree
Hide file tree
Showing 58 changed files with 1,083 additions and 268 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [10.7.0] - 2024-12-03

### Added
- Update pdf.js to v4.9.124.
- This version fixes #4468.

## [10.6.1] - 2024-11-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion dev/viewer/viewer.html.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/../../web/viewer.html b/../viewer/viewer.html
index 95d8aaf87..10e634932 100644
index c4829f2c4..8932bbc8a 100644
--- a/../../web/viewer.html
+++ b/../viewer/viewer.html
@@ -25,15 +25,17 @@ See https://github.com/adobe-type-tools/cmap-resources
Expand Down
30 changes: 15 additions & 15 deletions dev/viewer/viewer.mjs.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/../../web/viewer.mjs b/../viewer/viewer.mjs
index 043a14327..55f6640b3 100644
index b3d3e62a3..da9717dc3 100644
--- a/../../web/viewer.mjs
+++ b/../viewer/viewer.mjs
@@ -758,7 +758,7 @@ const defaultOptions = {
Expand Down Expand Up @@ -38,7 +38,7 @@ index 043a14327..55f6640b3 100644
kind: OptionKind.VIEWER
};
defaultOptions.viewerCssTheme = {
@@ -2614,7 +2614,7 @@ class Localization {
@@ -2615,7 +2615,7 @@ class Localization {
if (typeof console !== "undefined") {
const locale = bundle.locales[0];
const ids = Array.from(missingIds).join(", ");
Expand All @@ -47,7 +47,7 @@ index 043a14327..55f6640b3 100644
}
}
if (!hasAtLeastOneBundle && typeof console !== "undefined") {
@@ -3097,11 +3097,11 @@ class GenericScripting {
@@ -3098,11 +3098,11 @@ class GenericScripting {
function initCom(app) {}
class Preferences extends BasePreferences {
async _writeToStorage(prefObj) {
Expand All @@ -61,7 +61,7 @@ index 043a14327..55f6640b3 100644
};
}
}
@@ -5184,7 +5184,7 @@ const FindState = {
@@ -5183,7 +5183,7 @@ const FindState = {
PENDING: 3
};
const FIND_TIMEOUT = 250;
Expand All @@ -70,7 +70,7 @@ index 043a14327..55f6640b3 100644
const MATCH_SCROLL_OFFSET_LEFT = -400;
const CHARACTERS_TO_NORMALIZE = {
"\u2010": "-",
@@ -7586,6 +7586,9 @@ function renderProgress(index, total) {
@@ -7590,6 +7590,9 @@ function renderProgress(index, total) {
}
window.addEventListener("keydown", function (event) {
if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
Expand All @@ -80,7 +80,7 @@ index 043a14327..55f6640b3 100644
window.print();
event.preventDefault();
event.stopImmediatePropagation();
@@ -8170,7 +8173,7 @@ class PDFSidebar {
@@ -8174,7 +8177,7 @@ class PDFSidebar {
this.#dispatchEvent();
return;
}
Expand All @@ -89,7 +89,7 @@ index 043a14327..55f6640b3 100644
if (!this.isInitialEventDispatched) {
this.#dispatchEvent();
}
@@ -10892,7 +10895,7 @@ class PDFViewer {
@@ -10895,7 +10898,7 @@ class PDFViewer {
this.#enableNewAltTextWhenAddingImage = options.enableNewAltTextWhenAddingImage === true;
this.imageResourcesPath = options.imageResourcesPath || "";
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
Expand All @@ -98,7 +98,7 @@ index 043a14327..55f6640b3 100644
this.maxCanvasPixels = options.maxCanvasPixels;
this.l10n = options.l10n;
this.l10n ||= new genericl10n_GenericL10n();
@@ -11630,12 +11633,12 @@ class PDFViewer {
@@ -11631,12 +11634,12 @@ class PDFViewer {
hPadding *= 2;
}
} else if (this.removePageBorders) {
Expand All @@ -114,7 +114,7 @@ index 043a14327..55f6640b3 100644
switch (value) {
case "page-actual":
scale = 1;
@@ -11746,7 +11749,7 @@ class PDFViewer {
@@ -11747,7 +11750,7 @@ class PDFViewer {
let hPadding = SCROLLBAR_PADDING,
vPadding = VERTICAL_PADDING;
if (this.removePageBorders) {
Expand All @@ -123,7 +123,7 @@ index 043a14327..55f6640b3 100644
}
widthScale = (this.container.clientWidth - hPadding) / width / PixelsPerInch.PDF_TO_CSS_UNITS;
heightScale = (this.container.clientHeight - vPadding) / height / PixelsPerInch.PDF_TO_CSS_UNITS;
@@ -12986,10 +12989,10 @@ class ViewHistory {
@@ -12987,10 +12990,10 @@ class ViewHistory {
}
async _writeToStorage() {
const databaseStr = JSON.stringify(this.database);
Expand All @@ -136,7 +136,7 @@ index 043a14327..55f6640b3 100644
}
async set(name, val) {
await this._initializedPromise;
@@ -13573,7 +13576,7 @@ const PDFViewerApplication = {
@@ -13574,7 +13577,7 @@ const PDFViewerApplication = {
title = decodeURIComponent(getFilenameFromUrl(url));
} catch {}
}
Expand All @@ -145,7 +145,7 @@ index 043a14327..55f6640b3 100644
},
setTitle(title = this._title) {
this._title = title;
@@ -13997,7 +14000,7 @@ const PDFViewerApplication = {
@@ -13998,7 +14001,7 @@ const PDFViewerApplication = {
this.metadata = metadata;
this._contentDispositionFilename ??= contentDispositionFilename;
this._contentLength ??= contentLength;
Expand All @@ -154,7 +154,7 @@ index 043a14327..55f6640b3 100644
let pdfTitle = info.Title;
const metadataTitle = metadata?.get("dc:title");
if (metadataTitle) {
@@ -14128,9 +14131,9 @@ const PDFViewerApplication = {
@@ -14129,9 +14132,9 @@ const PDFViewerApplication = {
this.pdfSidebar?.setInitialView(sidebarView);
setViewerModes(scrollMode, spreadMode);
if (this.initialBookmark) {
Expand All @@ -166,7 +166,7 @@ index 043a14327..55f6640b3 100644
this.initialBookmark = null;
} else if (storedHash) {
setRotation(rotation);
@@ -15308,7 +15311,7 @@ function webViewerLoad() {
@@ -15290,7 +15293,7 @@ function webViewerLoad() {
try {
parent.document.dispatchEvent(event);
} catch (ex) {
Expand All @@ -175,7 +175,7 @@ index 043a14327..55f6640b3 100644
document.dispatchEvent(event);
}
PDFViewerApplication.run(config);
@@ -15325,4 +15328,3 @@ var __webpack_exports__PDFViewerApplicationConstants = __webpack_exports__.PDFVi
@@ -15307,4 +15310,3 @@ var __webpack_exports__PDFViewerApplicationConstants = __webpack_exports__.PDFVi
var __webpack_exports__PDFViewerApplicationOptions = __webpack_exports__.PDFViewerApplicationOptions;
export { __webpack_exports__PDFViewerApplication as PDFViewerApplication, __webpack_exports__PDFViewerApplicationConstants as PDFViewerApplicationConstants, __webpack_exports__PDFViewerApplicationOptions as PDFViewerApplicationOptions };

Expand Down
Loading

0 comments on commit c203bc1

Please sign in to comment.