Bump PDF.js from 4.3.118 to 4.3.136 (#1420)

Changelog: https://github.com/mozilla/pdf.js/releases/tag/v4.3.136
This commit is contained in:
Ludy 2024-06-09 11:45:25 +02:00 committed by GitHub
parent 7a15930453
commit 327a44d487
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 398 additions and 454 deletions

View file

@ -13,6 +13,242 @@
* limitations under the License. * limitations under the License.
*/ */
.dialog{
--dialog-bg-color:white;
--dialog-border-color:white;
--dialog-shadow:0 2px 14px 0 rgb(58 57 68 / 0.2);
--text-primary-color:#15141a;
--text-secondary-color:#5b5b66;
--hover-filter:brightness(0.9);
--focus-ring-color:#0060df;
--focus-ring-outline:2px solid var(--focus-ring-color);
--textarea-border-color:#8f8f9d;
--textarea-bg-color:white;
--textarea-fg-color:var(--text-secondary-color);
--radio-bg-color:#f0f0f4;
--radio-checked-bg-color:#fbfbfe;
--radio-border-color:#8f8f9d;
--radio-checked-border-color:#0060df;
--button-secondary-bg-color:#f0f0f4;
--button-secondary-fg-color:var(--text-primary-color);
--button-secondary-border-color:var(--button-secondary-bg-color);
--button-secondary-hover-bg-color:var(--button-secondary-bg-color);
--button-secondary-hover-fg-color:var(--button-secondary-fg-color);
--button-secondary-hover-border-color:var(--button-secondary-hover-bg-color);
--button-primary-bg-color:#0060df;
--button-primary-fg-color:#fbfbfe;
--button-primary-hover-bg-color:var(--button-primary-bg-color);
--button-primary-hover-fg-color:var(--button-primary-fg-color);
--button-primary-hover-border-color:var(--button-primary-hover-bg-color);
font:message-box;
font-size:13px;
font-weight:400;
line-height:150%;
border-radius:4px;
padding:12px 16px;
border:1px solid var(--dialog-border-color);
background:var(--dialog-bg-color);
color:var(--text-primary-color);
box-shadow:var(--dialog-shadow);
}
@media (prefers-color-scheme: dark){
:where(html:not(.is-light)) .dialog{
--dialog-bg-color:#1c1b22;
--dialog-border-color:#1c1b22;
--dialog-shadow:0 2px 14px 0 #15141a;
--text-primary-color:#fbfbfe;
--text-secondary-color:#cfcfd8;
--focus-ring-color:#0df;
--hover-filter:brightness(1.4);
--textarea-bg-color:#42414d;
--radio-bg-color:#2b2a33;
--radio-checked-bg-color:#15141a;
--radio-checked-border-color:#0df;
--button-secondary-bg-color:#2b2a33;
--button-primary-bg-color:#0df;
--button-primary-fg-color:#15141a;
}
}
:where(html.is-dark) .dialog{
--dialog-bg-color:#1c1b22;
--dialog-border-color:#1c1b22;
--dialog-shadow:0 2px 14px 0 #15141a;
--text-primary-color:#fbfbfe;
--text-secondary-color:#cfcfd8;
--focus-ring-color:#0df;
--hover-filter:brightness(1.4);
--textarea-bg-color:#42414d;
--radio-bg-color:#2b2a33;
--radio-checked-bg-color:#15141a;
--radio-checked-border-color:#0df;
--button-secondary-bg-color:#2b2a33;
--button-primary-bg-color:#0df;
--button-primary-fg-color:#15141a;
}
@media screen and (forced-colors: active){
.dialog{
--dialog-bg-color:Canvas;
--dialog-border-color:CanvasText;
--dialog-shadow:none;
--text-primary-color:CanvasText;
--text-secondary-color:CanvasText;
--hover-filter:none;
--focus-ring-color:ButtonBorder;
--textarea-border-color:ButtonBorder;
--textarea-bg-color:Field;
--textarea-fg-color:ButtonText;
--radio-bg-color:ButtonFace;
--radio-checked-bg-color:ButtonFace;
--radio-border-color:ButtonText;
--radio-checked-border-color:ButtonText;
--button-secondary-bg-color:ButtonFace;
--button-secondary-fg-color:ButtonText;
--button-secondary-border-color:ButtonText;
--button-secondary-hover-bg-color:AccentColor;
--button-secondary-hover-fg-color:AccentColorText;
--button-primary-bg-color:ButtonText;
--button-primary-fg-color:ButtonFace;
--button-primary-hover-bg-color:AccentColor;
--button-primary-hover-fg-color:AccentColorText;
}
}
.dialog .mainContainer *:focus-visible{
outline:var(--focus-ring-outline);
outline-offset:2px;
}
.dialog .mainContainer .radio{
display:flex;
flex-direction:column;
align-items:flex-start;
gap:4px;
}
.dialog .mainContainer .radio > .radioButton{
display:flex;
gap:8px;
align-self:stretch;
align-items:center;
}
.dialog .mainContainer .radio > .radioButton input{
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
box-sizing:border-box;
width:16px;
height:16px;
border-radius:50%;
background-color:var(--radio-bg-color);
border:1px solid var(--radio-border-color);
}
.dialog .mainContainer .radio > .radioButton input:hover{
filter:var(--hover-filter);
}
.dialog .mainContainer .radio > .radioButton input:checked{
background-color:var(--radio-checked-bg-color);
border:4px solid var(--radio-checked-border-color);
}
.dialog .mainContainer .radio > .radioLabel{
display:flex;
padding-inline-start:24px;
align-items:flex-start;
gap:10px;
align-self:stretch;
}
.dialog .mainContainer .radio > .radioLabel > span{
flex:1 0 0;
font-size:11px;
color:var(--text-secondary-color);
}
.dialog .mainContainer button{
border-radius:4px;
border:1px solid;
font:menu;
font-weight:600;
padding:4px 16px;
width:auto;
height:32px;
}
.dialog .mainContainer button:hover{
cursor:pointer;
filter:var(--hover-filter);
}
.dialog .mainContainer button.secondaryButton{
color:var(--button-secondary-fg-color);
background-color:var(--button-secondary-bg-color);
border-color:var(--button-secondary-border-color);
}
.dialog .mainContainer button.secondaryButton:hover{
color:var(--button-secondary-hover-fg-color);
background-color:var(--button-secondary-hover-bg-color);
border-color:var(--button-secondary-hover-border-color);
}
.dialog .mainContainer button.primaryButton{
color:var(--button-primary-hover-fg-color);
background-color:var(--button-primary-hover-bg-color);
border-color:var(--button-primary-hover-border-color);
opacity:1;
}
.dialog .mainContainer button.primaryButton:hover{
color:var(--button-primary-hover-fg-color);
background-color:var(--button-primary-hover-bg-color);
border-color:var(--button-primary-hover-border-color);
}
.dialog .mainContainer textarea{
font:inherit;
padding:8px;
resize:none;
margin:0;
box-sizing:border-box;
border-radius:4px;
border:1px solid var(--textarea-border-color);
background:var(--textarea-bg-color);
color:var(--textarea-fg-color);
}
.dialog .mainContainer textarea:focus{
outline-offset:0;
border-color:transparent;
}
.dialog .mainContainer textarea:disabled{
pointer-events:none;
opacity:0.4;
}
.textLayer{ .textLayer{
position:absolute; position:absolute;
text-align:initial; text-align:initial;
@ -1946,136 +2182,16 @@
inset-block-start:0; inset-block-start:0;
} }
#altTextDialog{ .dialog.altText::backdrop{
--dialog-bg-color:white;
--dialog-border-color:white;
--dialog-shadow:0 2px 14px 0 rgb(58 57 68 / 0.2);
--text-primary-color:#15141a;
--text-secondary-color:#5b5b66;
--hover-filter:brightness(0.9);
--focus-ring-color:#0060df;
--focus-ring-outline:2px solid var(--focus-ring-color);
--textarea-border-color:#8f8f9d;
--textarea-bg-color:white;
--textarea-fg-color:var(--text-secondary-color);
--radio-bg-color:#f0f0f4;
--radio-checked-bg-color:#fbfbfe;
--radio-border-color:#8f8f9d;
--radio-checked-border-color:#0060df;
--button-cancel-bg-color:#f0f0f4;
--button-cancel-fg-color:var(--text-primary-color);
--button-cancel-border-color:var(--button-cancel-bg-color);
--button-cancel-hover-bg-color:var(--button-cancel-bg-color);
--button-cancel-hover-fg-color:var(--button-cancel-fg-color);
--button-cancel-hover-border-color:var(--button-cancel-hover-bg-color);
--button-save-bg-color:#0060df;
--button-save-fg-color:#fbfbfe;
--button-save-hover-bg-color:var(--button-save-bg-color);
--button-save-hover-fg-color:var(--button-save-fg-color);
--button-save-hover-border-color:var(--button-save-hover-bg-color);
font:message-box;
font-size:13px;
font-weight:400;
line-height:150%;
border-radius:4px;
padding:12px 16px;
border:1px solid var(--dialog-border-color);
background:var(--dialog-bg-color);
color:var(--text-primary-color);
box-shadow:var(--dialog-shadow);
}
@media (prefers-color-scheme: dark){
:where(html:not(.is-light)) #altTextDialog{
--dialog-bg-color:#1c1b22;
--dialog-border-color:#1c1b22;
--dialog-shadow:0 2px 14px 0 #15141a;
--text-primary-color:#fbfbfe;
--text-secondary-color:#cfcfd8;
--focus-ring-color:#0df;
--hover-filter:brightness(1.4);
--textarea-bg-color:#42414d;
--radio-bg-color:#2b2a33;
--radio-checked-bg-color:#15141a;
--radio-checked-border-color:#0df;
--button-cancel-bg-color:#2b2a33;
--button-save-bg-color:#0df;
--button-save-fg-color:#15141a;
}
}
:where(html.is-dark) #altTextDialog{
--dialog-bg-color:#1c1b22;
--dialog-border-color:#1c1b22;
--dialog-shadow:0 2px 14px 0 #15141a;
--text-primary-color:#fbfbfe;
--text-secondary-color:#cfcfd8;
--focus-ring-color:#0df;
--hover-filter:brightness(1.4);
--textarea-bg-color:#42414d;
--radio-bg-color:#2b2a33;
--radio-checked-bg-color:#15141a;
--radio-checked-border-color:#0df;
--button-cancel-bg-color:#2b2a33;
--button-save-bg-color:#0df;
--button-save-fg-color:#15141a;
}
@media screen and (forced-colors: active){
#altTextDialog{
--dialog-bg-color:Canvas;
--dialog-border-color:CanvasText;
--dialog-shadow:none;
--text-primary-color:CanvasText;
--text-secondary-color:CanvasText;
--hover-filter:none;
--focus-ring-color:ButtonBorder;
--textarea-border-color:ButtonBorder;
--textarea-bg-color:Field;
--textarea-fg-color:ButtonText;
--radio-bg-color:ButtonFace;
--radio-checked-bg-color:ButtonFace;
--radio-border-color:ButtonText;
--radio-checked-border-color:ButtonText;
--button-cancel-bg-color:ButtonFace;
--button-cancel-fg-color:ButtonText;
--button-cancel-border-color:ButtonText;
--button-cancel-hover-bg-color:AccentColor;
--button-cancel-hover-fg-color:AccentColorText;
--button-save-bg-color:ButtonText;
--button-save-fg-color:ButtonFace;
--button-save-hover-bg-color:AccentColor;
--button-save-hover-fg-color:AccentColorText;
}
}
#altTextDialog::backdrop{
-webkit-mask:url(#alttext-manager-mask); -webkit-mask:url(#alttext-manager-mask);
mask:url(#alttext-manager-mask); mask:url(#alttext-manager-mask);
} }
#altTextDialog.positioned{ .dialog.altText.positioned{
margin:0; margin:0;
} }
#altTextDialog #altTextContainer{ .dialog.altText #altTextContainer{
width:300px; width:300px;
height:-moz-fit-content; height:-moz-fit-content;
height:fit-content; height:fit-content;
@ -2085,61 +2201,7 @@
gap:16px; gap:16px;
} }
#altTextDialog #altTextContainer *:focus-visible{ .dialog.altText #altTextContainer #overallDescription{
outline:var(--focus-ring-outline);
outline-offset:2px;
}
#altTextDialog #altTextContainer .radio{
display:flex;
flex-direction:column;
align-items:flex-start;
gap:4px;
}
#altTextDialog #altTextContainer .radio .radioButton{
display:flex;
gap:8px;
align-self:stretch;
align-items:center;
}
#altTextDialog #altTextContainer .radio .radioButton input{
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
box-sizing:border-box;
width:16px;
height:16px;
border-radius:50%;
background-color:var(--radio-bg-color);
border:1px solid var(--radio-border-color);
}
#altTextDialog #altTextContainer .radio .radioButton input:hover{
filter:var(--hover-filter);
}
#altTextDialog #altTextContainer .radio .radioButton input:checked{
background-color:var(--radio-checked-bg-color);
border:4px solid var(--radio-checked-border-color);
}
#altTextDialog #altTextContainer .radio .radioLabel{
display:flex;
padding-inline-start:24px;
align-items:flex-start;
gap:10px;
align-self:stretch;
}
#altTextDialog #altTextContainer .radio .radioLabel span{
flex:1 0 0;
font-size:11px;
color:var(--text-secondary-color);
}
#altTextDialog #altTextContainer #overallDescription{
display:flex; display:flex;
flex-direction:column; flex-direction:column;
align-items:flex-start; align-items:flex-start;
@ -2147,53 +2209,34 @@
align-self:stretch; align-self:stretch;
} }
#altTextDialog #altTextContainer #overallDescription span{ .dialog.altText #altTextContainer #overallDescription span{
align-self:stretch; align-self:stretch;
} }
#altTextDialog #altTextContainer #overallDescription .title{ .dialog.altText #altTextContainer #overallDescription .title{
font-size:13px; font-size:13px;
font-style:normal; font-style:normal;
font-weight:590; font-weight:590;
} }
#altTextDialog #altTextContainer #addDescription{ .dialog.altText #altTextContainer #addDescription{
display:flex; display:flex;
flex-direction:column; flex-direction:column;
align-items:stretch; align-items:stretch;
gap:8px; gap:8px;
} }
#altTextDialog #altTextContainer #addDescription .descriptionArea{ .dialog.altText #altTextContainer #addDescription .descriptionArea{
flex:1; flex:1;
padding-inline:24px 10px; padding-inline:24px 10px;
} }
#altTextDialog #altTextContainer #addDescription .descriptionArea textarea{ .dialog.altText #altTextContainer #addDescription .descriptionArea textarea{
font:inherit;
width:100%; width:100%;
min-height:75px; min-height:75px;
padding:8px;
resize:none;
margin:0;
box-sizing:border-box;
border-radius:4px;
border:1px solid var(--textarea-border-color);
background:var(--textarea-bg-color);
color:var(--textarea-fg-color);
} }
#altTextDialog #altTextContainer #addDescription .descriptionArea textarea:focus{ .dialog.altText #altTextContainer #buttons{
outline-offset:0;
border-color:transparent;
}
#altTextDialog #altTextContainer #addDescription .descriptionArea textarea:disabled{
pointer-events:none;
opacity:0.4;
}
#altTextDialog #altTextContainer #buttons{
display:flex; display:flex;
justify-content:flex-end; justify-content:flex-end;
align-items:flex-start; align-items:flex-start;
@ -2201,46 +2244,6 @@
align-self:stretch; align-self:stretch;
} }
#altTextDialog #altTextContainer #buttons button{
border-radius:4px;
border:1px solid;
font:menu;
font-weight:600;
padding:4px 16px;
width:auto;
height:32px;
}
#altTextDialog #altTextContainer #buttons button:hover{
cursor:pointer;
filter:var(--hover-filter);
}
#altTextDialog #altTextContainer #buttons button#altTextCancel{
color:var(--button-cancel-fg-color);
background-color:var(--button-cancel-bg-color);
border-color:var(--button-cancel-border-color);
}
#altTextDialog #altTextContainer #buttons button#altTextCancel:hover{
color:var(--button-cancel-hover-fg-color);
background-color:var(--button-cancel-hover-bg-color);
border-color:var(--button-cancel-hover-border-color);
}
#altTextDialog #altTextContainer #buttons button#altTextSave{
color:var(--button-save-hover-fg-color);
background-color:var(--button-save-hover-bg-color);
border-color:var(--button-save-hover-border-color);
opacity:1;
}
#altTextDialog #altTextContainer #buttons button#altTextSave:hover{
color:var(--button-save-hover-fg-color);
background-color:var(--button-save-hover-bg-color);
border-color:var(--button-save-hover-border-color);
}
.colorPicker{ .colorPicker{
--hover-outline-color:#0250bb; --hover-outline-color:#0250bb;
--selected-outline-color:#0060df; --selected-outline-color:#0060df;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -8912,17 +8912,18 @@ class TextHighlighter {
class TextLayerBuilder { class TextLayerBuilder {
#enablePermissions = false; #enablePermissions = false;
#onAppend = null; #onAppend = null;
#textContentSource = null; #renderingDone = false;
#textLayer = null; #textLayer = null;
static #textLayers = new Map(); static #textLayers = new Map();
static #selectionChangeAbortController = null; static #selectionChangeAbortController = null;
constructor({ constructor({
pdfPage,
highlighter = null, highlighter = null,
accessibilityManager = null, accessibilityManager = null,
enablePermissions = false, enablePermissions = false,
onAppend = null onAppend = null
}) { }) {
this.renderingDone = false; this.pdfPage = pdfPage;
this.highlighter = highlighter; this.highlighter = highlighter;
this.accessibilityManager = accessibilityManager; this.accessibilityManager = accessibilityManager;
this.#enablePermissions = enablePermissions === true; this.#enablePermissions = enablePermissions === true;
@ -8932,17 +8933,14 @@ class TextLayerBuilder {
this.div.className = "textLayer"; this.div.className = "textLayer";
} }
#finishRendering() { #finishRendering() {
this.renderingDone = true; this.#renderingDone = true;
const endOfContent = document.createElement("div"); const endOfContent = document.createElement("div");
endOfContent.className = "endOfContent"; endOfContent.className = "endOfContent";
this.div.append(endOfContent); this.div.append(endOfContent);
this.#bindMouse(endOfContent); this.#bindMouse(endOfContent);
} }
async render(viewport) { async render(viewport, textContentParams = null) {
if (!this.#textContentSource) { if (this.#renderingDone && this.#textLayer) {
throw new Error('No "textContentSource" parameter specified.');
}
if (this.renderingDone && this.#textLayer) {
this.#textLayer.update({ this.#textLayer.update({
viewport, viewport,
onBefore: this.hide.bind(this) onBefore: this.hide.bind(this)
@ -8952,7 +8950,10 @@ class TextLayerBuilder {
} }
this.cancel(); this.cancel();
this.#textLayer = new TextLayer({ this.#textLayer = new TextLayer({
textContentSource: this.#textContentSource, textContentSource: this.pdfPage.streamTextContent(textContentParams || {
includeMarkedContent: true,
disableNormalization: true
}),
container: this.div, container: this.div,
viewport viewport
}); });
@ -8969,13 +8970,13 @@ class TextLayerBuilder {
this.accessibilityManager?.enable(); this.accessibilityManager?.enable();
} }
hide() { hide() {
if (!this.div.hidden && this.renderingDone) { if (!this.div.hidden && this.#renderingDone) {
this.highlighter?.disable(); this.highlighter?.disable();
this.div.hidden = true; this.div.hidden = true;
} }
} }
show() { show() {
if (this.div.hidden && this.renderingDone) { if (this.div.hidden && this.#renderingDone) {
this.div.hidden = false; this.div.hidden = false;
this.highlighter?.enable(); this.highlighter?.enable();
} }
@ -8987,10 +8988,6 @@ class TextLayerBuilder {
this.accessibilityManager?.disable(); this.accessibilityManager?.disable();
TextLayerBuilder.#removeGlobalSelectionListener(this.div); TextLayerBuilder.#removeGlobalSelectionListener(this.div);
} }
setTextContentSource(source) {
this.cancel();
this.#textContentSource = source;
}
#bindMouse(end) { #bindMouse(end) {
const { const {
div div
@ -9261,6 +9258,13 @@ class PDFPageView {
findController: this.#layerProperties.findController findController: this.#layerProperties.findController
})); }));
} }
#dispatchLayerRendered(name, error) {
this.eventBus.dispatch(name, {
source: this,
pageNumber: this.id,
error
});
}
async #renderAnnotationLayer() { async #renderAnnotationLayer() {
let error = null; let error = null;
try { try {
@ -9269,11 +9273,7 @@ class PDFPageView {
console.error(`#renderAnnotationLayer: "${ex}".`); console.error(`#renderAnnotationLayer: "${ex}".`);
error = ex; error = ex;
} finally { } finally {
this.eventBus.dispatch("annotationlayerrendered", { this.#dispatchLayerRendered("annotationlayerrendered", error);
source: this,
pageNumber: this.id,
error
});
} }
} }
async #renderAnnotationEditorLayer() { async #renderAnnotationEditorLayer() {
@ -9284,11 +9284,7 @@ class PDFPageView {
console.error(`#renderAnnotationEditorLayer: "${ex}".`); console.error(`#renderAnnotationEditorLayer: "${ex}".`);
error = ex; error = ex;
} finally { } finally {
this.eventBus.dispatch("annotationeditorlayerrendered", { this.#dispatchLayerRendered("annotationeditorlayerrendered", error);
source: this,
pageNumber: this.id,
error
});
} }
} }
async #renderDrawLayer() { async #renderDrawLayer() {
@ -9314,32 +9310,16 @@ class PDFPageView {
this.#addLayer(this.xfaLayer.div, "xfaLayer"); this.#addLayer(this.xfaLayer.div, "xfaLayer");
this.l10n.resume(); this.l10n.resume();
} }
this.eventBus.dispatch("xfalayerrendered", { this.#dispatchLayerRendered("xfalayerrendered", error);
source: this,
pageNumber: this.id,
error
});
} }
} }
async #renderTextLayer() { async #renderTextLayer() {
const { if (!this.textLayer) {
pdfPage,
textLayer,
viewport
} = this;
if (!textLayer) {
return; return;
} }
let error = null; let error = null;
try { try {
if (!textLayer.renderingDone) { await this.textLayer.render(this.viewport);
const readableStream = pdfPage.streamTextContent({
includeMarkedContent: true,
disableNormalization: true
});
textLayer.setTextContentSource(readableStream);
}
await textLayer.render(viewport);
} catch (ex) { } catch (ex) {
if (ex instanceof AbortException) { if (ex instanceof AbortException) {
return; return;
@ -9347,11 +9327,7 @@ class PDFPageView {
console.error(`#renderTextLayer: "${ex}".`); console.error(`#renderTextLayer: "${ex}".`);
error = ex; error = ex;
} }
this.eventBus.dispatch("textlayerrendered", { this.#dispatchLayerRendered("textlayerrendered", error);
source: this,
pageNumber: this.id,
error
});
this.#renderStructTreeLayer(); this.#renderStructTreeLayer();
} }
async #renderStructTreeLayer() { async #renderStructTreeLayer() {
@ -9694,6 +9670,7 @@ class PDFPageView {
if (!this.textLayer && this.#textLayerMode !== TextLayerMode.DISABLE && !pdfPage.isPureXfa) { if (!this.textLayer && this.#textLayerMode !== TextLayerMode.DISABLE && !pdfPage.isPureXfa) {
this._accessibilityManager ||= new TextAccessibilityManager(); this._accessibilityManager ||= new TextAccessibilityManager();
this.textLayer = new TextLayerBuilder({ this.textLayer = new TextLayerBuilder({
pdfPage,
highlighter: this._textHighlighter, highlighter: this._textHighlighter,
accessibilityManager: this._accessibilityManager, accessibilityManager: this._accessibilityManager,
enablePermissions: this.#textLayerMode === TextLayerMode.ENABLE_PERMISSIONS, enablePermissions: this.#textLayerMode === TextLayerMode.ENABLE_PERMISSIONS,
@ -9801,7 +9778,7 @@ class PDFPageView {
annotationCanvasMap: this._annotationCanvasMap, annotationCanvasMap: this._annotationCanvasMap,
pageColors pageColors
}; };
const renderTask = this.renderTask = this.pdfPage.render(renderContext); const renderTask = this.renderTask = pdfPage.render(renderContext);
renderTask.onContinue = renderContinueCallback; renderTask.onContinue = renderContinueCallback;
const resultPromise = renderTask.promise.then(async () => { const resultPromise = renderTask.promise.then(async () => {
showCanvas?.(true); showCanvas?.(true);
@ -9969,7 +9946,7 @@ class PDFViewer {
#scaleTimeoutId = null; #scaleTimeoutId = null;
#textLayerMode = TextLayerMode.ENABLE; #textLayerMode = TextLayerMode.ENABLE;
constructor(options) { constructor(options) {
const viewerVersion = "4.3.118"; const viewerVersion = "4.3.136";
if (version !== viewerVersion) { if (version !== viewerVersion) {
throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`); throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`);
} }
@ -10634,7 +10611,8 @@ class PDFViewer {
#setScaleUpdatePages(newScale, newValue, { #setScaleUpdatePages(newScale, newValue, {
noScroll = false, noScroll = false,
preset = false, preset = false,
drawingDelay = -1 drawingDelay = -1,
origin = null
}) { }) {
this._currentScaleValue = newValue.toString(); this._currentScaleValue = newValue.toString();
if (this.#isSameScale(newScale)) { if (this.#isSameScale(newScale)) {
@ -10659,6 +10637,7 @@ class PDFViewer {
this.refresh(); this.refresh();
}, drawingDelay); }, drawingDelay);
} }
const previousScale = this._currentScale;
this._currentScale = newScale; this._currentScale = newScale;
if (!noScroll) { if (!noScroll) {
let page = this._currentPageNumber, let page = this._currentPageNumber,
@ -10674,6 +10653,12 @@ class PDFViewer {
destArray: dest, destArray: dest,
allowNegativeOffset: true allowNegativeOffset: true
}); });
if (Array.isArray(origin)) {
const scaleDiff = newScale / previousScale - 1;
const [top, left] = this.containerTopLeft;
this.container.scrollLeft += (origin[0] - left) * scaleDiff;
this.container.scrollTop += (origin[1] - top) * scaleDiff;
}
} }
this.eventBus.dispatch("scalechanging", { this.eventBus.dispatch("scalechanging", {
source: this, source: this,
@ -11281,48 +11266,46 @@ class PDFViewer {
this.currentPageNumber = Math.max(currentPageNumber - advance, 1); this.currentPageNumber = Math.max(currentPageNumber - advance, 1);
return true; return true;
} }
increaseScale({ updateScale({
drawingDelay, drawingDelay,
scaleFactor, scaleFactor = null,
steps steps = null,
} = {}) { origin
}) {
if (steps === null && scaleFactor === null) {
throw new Error("Invalid updateScale options: either `steps` or `scaleFactor` must be provided.");
}
if (!this.pdfDocument) { if (!this.pdfDocument) {
return; return;
} }
let newScale = this._currentScale; let newScale = this._currentScale;
if (scaleFactor > 1) { if (scaleFactor > 0 && scaleFactor !== 1) {
newScale = Math.round(newScale * scaleFactor * 100) / 100; newScale = Math.round(newScale * scaleFactor * 100) / 100;
} else { } else if (steps) {
steps ??= 1; const delta = steps > 0 ? DEFAULT_SCALE_DELTA : 1 / DEFAULT_SCALE_DELTA;
const round = steps > 0 ? Math.ceil : Math.floor;
steps = Math.abs(steps);
do { do {
newScale = Math.ceil((newScale * DEFAULT_SCALE_DELTA).toFixed(2) * 10) / 10; newScale = round((newScale * delta).toFixed(2) * 10) / 10;
} while (--steps > 0 && newScale < MAX_SCALE); } while (--steps > 0);
} }
this.#setScale(Math.min(MAX_SCALE, newScale), { newScale = Math.max(MIN_SCALE, Math.min(MAX_SCALE, newScale));
this.#setScale(newScale, {
noScroll: false, noScroll: false,
drawingDelay drawingDelay,
origin
}); });
} }
decreaseScale({ increaseScale(options = {}) {
drawingDelay, this.updateScale({
scaleFactor, ...options,
steps steps: options.steps ?? 1
} = {}) { });
if (!this.pdfDocument) { }
return; decreaseScale(options = {}) {
} this.updateScale({
let newScale = this._currentScale; ...options,
if (scaleFactor > 0 && scaleFactor < 1) { steps: -(options.steps ?? 1)
newScale = Math.round(newScale * scaleFactor * 100) / 100;
} else {
steps ??= 1;
do {
newScale = Math.floor((newScale / DEFAULT_SCALE_DELTA).toFixed(2) * 10) / 10;
} while (--steps > 0 && newScale > MIN_SCALE);
}
this.#setScale(Math.max(MIN_SCALE, newScale), {
noScroll: false,
drawingDelay
}); });
} }
#updateContainerHeightCss(height = this.container.clientHeight) { #updateContainerHeightCss(height = this.container.clientHeight) {
@ -12465,25 +12448,22 @@ const PDFViewerApplication = {
get initializedPromise() { get initializedPromise() {
return this._initializedCapability.promise; return this._initializedCapability.promise;
}, },
zoomIn(steps, scaleFactor) { updateZoom(steps, scaleFactor, origin) {
if (this.pdfViewer.isInPresentationMode) { if (this.pdfViewer.isInPresentationMode) {
return; return;
} }
this.pdfViewer.increaseScale({ this.pdfViewer.updateScale({
drawingDelay: AppOptions.get("defaultZoomDelay"), drawingDelay: AppOptions.get("defaultZoomDelay"),
steps, steps,
scaleFactor scaleFactor,
origin
}); });
}, },
zoomOut(steps, scaleFactor) { zoomIn() {
if (this.pdfViewer.isInPresentationMode) { this.updateZoom(1);
return; },
} zoomOut() {
this.pdfViewer.decreaseScale({ this.updateZoom(-1);
drawingDelay: AppOptions.get("defaultZoomDelay"),
steps,
scaleFactor
});
}, },
zoomReset() { zoomReset() {
if (this.pdfViewer.isInPresentationMode) { if (this.pdfViewer.isInPresentationMode) {
@ -13510,17 +13490,6 @@ const PDFViewerApplication = {
this[prop] = factor / newFactor; this[prop] = factor / newFactor;
return newFactor; return newFactor;
}, },
_centerAtPos(previousScale, x, y) {
const {
pdfViewer
} = this;
const scaleDiff = pdfViewer.currentScale / previousScale - 1;
if (scaleDiff !== 0) {
const [top, left] = pdfViewer.containerTopLeft;
pdfViewer.container.scrollLeft += (x - left) * scaleDiff;
pdfViewer.container.scrollTop += (y - top) * scaleDiff;
}
},
_unblockDocumentLoadEvent() { _unblockDocumentLoadEvent() {
document.blockUnblockOnload?.(false); document.blockUnblockOnload?.(false);
this._unblockDocumentLoadEvent = () => {}; this._unblockDocumentLoadEvent = () => {};
@ -13866,21 +13835,15 @@ function webViewerWheel(evt) {
let scaleFactor = Math.exp(-evt.deltaY / 100); let scaleFactor = Math.exp(-evt.deltaY / 100);
const isBuiltInMac = false; const isBuiltInMac = false;
const isPinchToZoom = evt.ctrlKey && !PDFViewerApplication._isCtrlKeyDown && deltaMode === WheelEvent.DOM_DELTA_PIXEL && evt.deltaX === 0 && (Math.abs(scaleFactor - 1) < 0.05 || isBuiltInMac) && evt.deltaZ === 0; const isPinchToZoom = evt.ctrlKey && !PDFViewerApplication._isCtrlKeyDown && deltaMode === WheelEvent.DOM_DELTA_PIXEL && evt.deltaX === 0 && (Math.abs(scaleFactor - 1) < 0.05 || isBuiltInMac) && evt.deltaZ === 0;
const origin = [evt.clientX, evt.clientY];
if (isPinchToZoom || evt.ctrlKey && supportsMouseWheelZoomCtrlKey || evt.metaKey && supportsMouseWheelZoomMetaKey) { if (isPinchToZoom || evt.ctrlKey && supportsMouseWheelZoomCtrlKey || evt.metaKey && supportsMouseWheelZoomMetaKey) {
evt.preventDefault(); evt.preventDefault();
if (PDFViewerApplication._isScrolling || zoomDisabledTimeout || document.visibilityState === "hidden" || PDFViewerApplication.overlayManager.active) { if (PDFViewerApplication._isScrolling || zoomDisabledTimeout || document.visibilityState === "hidden" || PDFViewerApplication.overlayManager.active) {
return; return;
} }
const previousScale = pdfViewer.currentScale;
if (isPinchToZoom && supportsPinchToZoom) { if (isPinchToZoom && supportsPinchToZoom) {
scaleFactor = PDFViewerApplication._accumulateFactor(previousScale, scaleFactor, "_wheelUnusedFactor"); scaleFactor = PDFViewerApplication._accumulateFactor(pdfViewer.currentScale, scaleFactor, "_wheelUnusedFactor");
if (scaleFactor < 1) { PDFViewerApplication.updateZoom(null, scaleFactor, origin);
PDFViewerApplication.zoomOut(null, scaleFactor);
} else if (scaleFactor > 1) {
PDFViewerApplication.zoomIn(null, scaleFactor);
} else {
return;
}
} else { } else {
const delta = normalizeWheelEventDirection(evt); const delta = normalizeWheelEventDirection(evt);
let ticks = 0; let ticks = 0;
@ -13894,15 +13857,8 @@ function webViewerWheel(evt) {
const PIXELS_PER_LINE_SCALE = 30; const PIXELS_PER_LINE_SCALE = 30;
ticks = PDFViewerApplication._accumulateTicks(delta / PIXELS_PER_LINE_SCALE, "_wheelUnusedTicks"); ticks = PDFViewerApplication._accumulateTicks(delta / PIXELS_PER_LINE_SCALE, "_wheelUnusedTicks");
} }
if (ticks < 0) { PDFViewerApplication.updateZoom(ticks, null, origin);
PDFViewerApplication.zoomOut(-ticks);
} else if (ticks > 0) {
PDFViewerApplication.zoomIn(ticks);
} else {
return;
}
} }
PDFViewerApplication._centerAtPos(previousScale, evt.clientX, evt.clientY);
} }
} }
function webViewerTouchStart(evt) { function webViewerTouchStart(evt) {
@ -13988,30 +13944,17 @@ function webViewerTouchMove(evt) {
} }
} }
evt.preventDefault(); evt.preventDefault();
const origin = [(page0X + page1X) / 2, (page0Y + page1Y) / 2];
const distance = Math.hypot(page0X - page1X, page0Y - page1Y) || 1; const distance = Math.hypot(page0X - page1X, page0Y - page1Y) || 1;
const pDistance = Math.hypot(pTouch0X - pTouch1X, pTouch0Y - pTouch1Y) || 1; const pDistance = Math.hypot(pTouch0X - pTouch1X, pTouch0Y - pTouch1Y) || 1;
const previousScale = pdfViewer.currentScale;
if (supportsPinchToZoom) { if (supportsPinchToZoom) {
const newScaleFactor = PDFViewerApplication._accumulateFactor(previousScale, distance / pDistance, "_touchUnusedFactor"); const newScaleFactor = PDFViewerApplication._accumulateFactor(pdfViewer.currentScale, distance / pDistance, "_touchUnusedFactor");
if (newScaleFactor < 1) { PDFViewerApplication.updateZoom(null, newScaleFactor, origin);
PDFViewerApplication.zoomOut(null, newScaleFactor);
} else if (newScaleFactor > 1) {
PDFViewerApplication.zoomIn(null, newScaleFactor);
} else {
return;
}
} else { } else {
const PIXELS_PER_LINE_SCALE = 30; const PIXELS_PER_LINE_SCALE = 30;
const ticks = PDFViewerApplication._accumulateTicks((distance - pDistance) / PIXELS_PER_LINE_SCALE, "_touchUnusedTicks"); const ticks = PDFViewerApplication._accumulateTicks((distance - pDistance) / PIXELS_PER_LINE_SCALE, "_touchUnusedTicks");
if (ticks < 0) { PDFViewerApplication.updateZoom(ticks, null, origin);
PDFViewerApplication.zoomOut(-ticks);
} else if (ticks > 0) {
PDFViewerApplication.zoomIn(ticks);
} else {
return;
}
} }
PDFViewerApplication._centerAtPos(previousScale, (page0X + page1X) / 2, (page0Y + page1Y) / 2);
} }
function webViewerTouchEnd(evt) { function webViewerTouchEnd(evt) {
if (!PDFViewerApplication._touchInfo) { if (!PDFViewerApplication._touchInfo) {
@ -14329,8 +14272,8 @@ function webViewerReportTelemetry({
const pdfjsVersion = "4.3.118"; const pdfjsVersion = "4.3.136";
const pdfjsBuild = "17e09e547"; const pdfjsBuild = "0cec64437";
const AppConstants = { const AppConstants = {
LinkTarget: LinkTarget, LinkTarget: LinkTarget,
RenderingStates: RenderingStates, RenderingStates: RenderingStates,
@ -14465,7 +14408,7 @@ function getViewerConfiguration() {
editorFreeHighlightThickness: document.getElementById("editorFreeHighlightThickness"), editorFreeHighlightThickness: document.getElementById("editorFreeHighlightThickness"),
editorHighlightShowAll: document.getElementById("editorHighlightShowAll") editorHighlightShowAll: document.getElementById("editorHighlightShowAll")
}, },
printContainer: document.getElementById("printContainer"), printContainer: document.getElementById("printContainer")
}; };
} }
function webViewerLoad() { function webViewerLoad() {

File diff suppressed because one or more lines are too long

View file

@ -10256,7 +10256,6 @@ class TextLayer {
this.#pageWidth = pageWidth; this.#pageWidth = pageWidth;
this.#pageHeight = pageHeight; this.#pageHeight = pageHeight;
setLayerDimensions(container, viewport); setLayerDimensions(container, viewport);
TextLayer.#pendingTextLayers.add(this);
this.#capability.promise.catch(() => {}).then(() => { this.#capability.promise.catch(() => {}).then(() => {
TextLayer.#pendingTextLayers.delete(this); TextLayer.#pendingTextLayers.delete(this);
this.#layoutTextParams = null; this.#layoutTextParams = null;
@ -10280,6 +10279,7 @@ class TextLayer {
}, this.#capability.reject); }, this.#capability.reject);
}; };
this.#reader = this.#textContentSource.getReader(); this.#reader = this.#textContentSource.getReader();
TextLayer.#pendingTextLayers.add(this);
pump(); pump();
return this.#capability.promise; return this.#capability.promise;
} }
@ -10724,7 +10724,7 @@ function getDocument(src) {
} }
const docParams = { const docParams = {
docId, docId,
apiVersion: "4.3.118", apiVersion: "4.3.136",
data, data,
password, password,
disableAutoFetch, disableAutoFetch,
@ -12491,8 +12491,8 @@ class InternalRenderTask {
} }
} }
} }
const version = "4.3.118"; const version = "4.3.136";
const build = "17e09e547"; const build = "0cec64437";
;// CONCATENATED MODULE: ./src/shared/scripting_utils.js ;// CONCATENATED MODULE: ./src/shared/scripting_utils.js
function makeColorComp(n) { function makeColorComp(n) {
@ -19367,8 +19367,8 @@ class DrawLayer {
const pdfjsVersion = "4.3.118"; const pdfjsVersion = "4.3.136";
const pdfjsBuild = "17e09e547"; const pdfjsBuild = "0cec64437";
var __webpack_exports__AbortException = __webpack_exports__.AbortException; var __webpack_exports__AbortException = __webpack_exports__.AbortException;
var __webpack_exports__AnnotationEditorLayer = __webpack_exports__.AnnotationEditorLayer; var __webpack_exports__AnnotationEditorLayer = __webpack_exports__.AnnotationEditorLayer;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -8930,11 +8930,10 @@ class Parser {
if (this.tryShift() && isCmd(this.buf2, "endstream")) { if (this.tryShift() && isCmd(this.buf2, "endstream")) {
this.shift(); this.shift();
} else { } else {
const actualLength = this.#findStreamLength(startPos); length = this.#findStreamLength(startPos);
if (actualLength < 0) { if (length < 0) {
throw new FormatError("Missing endstream command."); throw new FormatError("Missing endstream command.");
} }
length = actualLength;
lexer.nextChar(); lexer.nextChar();
this.shift(); this.shift();
this.shift(); this.shift();
@ -29696,7 +29695,7 @@ class PartialEvaluator {
this.globalImageCache = globalImageCache; this.globalImageCache = globalImageCache;
this.systemFontCache = systemFontCache; this.systemFontCache = systemFontCache;
this.options = options || DefaultPartialEvaluatorOptions; this.options = options || DefaultPartialEvaluatorOptions;
this.parsingType3Font = false; this.type3FontRefs = null;
this._regionalImageCache = new RegionalImageCache(); this._regionalImageCache = new RegionalImageCache();
this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this); this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this);
ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes); ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes);
@ -29708,6 +29707,9 @@ class PartialEvaluator {
}); });
return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory); return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory);
} }
get parsingType3Font() {
return !!this.type3FontRefs;
}
clone(newOptions = null) { clone(newOptions = null) {
const newEvaluator = Object.create(this); const newEvaluator = Object.create(this);
newEvaluator.options = Object.assign(Object.create(null), this.options, newOptions); newEvaluator.options = Object.assign(Object.create(null), this.options, newOptions);
@ -30396,7 +30398,7 @@ class PartialEvaluator {
} }
} }
if (fontRef) { if (fontRef) {
if (this.parsingType3Font && this.type3FontRefs.has(fontRef)) { if (this.type3FontRefs?.has(fontRef)) {
return errorFont(); return errorFont();
} }
if (this.fontCache.has(fontRef)) { if (this.fontCache.has(fontRef)) {
@ -32831,7 +32833,6 @@ class TranslatedFont {
const type3Evaluator = evaluator.clone({ const type3Evaluator = evaluator.clone({
ignoreErrors: false ignoreErrors: false
}); });
type3Evaluator.parsingType3Font = true;
const type3FontRefs = new RefSet(evaluator.type3FontRefs); const type3FontRefs = new RefSet(evaluator.type3FontRefs);
if (this.dict.objId && !type3FontRefs.has(this.dict.objId)) { if (this.dict.objId && !type3FontRefs.has(this.dict.objId)) {
type3FontRefs.put(this.dict.objId); type3FontRefs.put(this.dict.objId);
@ -53722,52 +53723,49 @@ class Page {
systemFontCache: this.systemFontCache, systemFontCache: this.systemFontCache,
options: this.evaluatorOptions options: this.evaluatorOptions
}); });
const newAnnotationsByPage = !this.xfaFactory ? getNewAnnotationsMap(annotationStorage) : null; const newAnnotsByPage = !this.xfaFactory ? getNewAnnotationsMap(annotationStorage) : null;
let deletedAnnotations = null; const newAnnots = newAnnotsByPage?.get(this.pageIndex);
let newAnnotationsPromise = Promise.resolve(null); let newAnnotationsPromise = Promise.resolve(null);
if (newAnnotationsByPage) { let deletedAnnotations = null;
const newAnnotations = newAnnotationsByPage.get(this.pageIndex); if (newAnnots) {
if (newAnnotations) { const annotationGlobalsPromise = this.pdfManager.ensureDoc("annotationGlobals");
const annotationGlobalsPromise = this.pdfManager.ensureDoc("annotationGlobals"); let imagePromises;
let imagePromises; const missingBitmaps = new Set();
const missingBitmaps = new Set(); for (const {
for (const { bitmapId,
bitmapId, bitmap
bitmap } of newAnnots) {
} of newAnnotations) { if (bitmapId && !bitmap && !missingBitmaps.has(bitmapId)) {
if (bitmapId && !bitmap && !missingBitmaps.has(bitmapId)) { missingBitmaps.add(bitmapId);
missingBitmaps.add(bitmapId);
}
} }
const {
isOffscreenCanvasSupported
} = this.evaluatorOptions;
if (missingBitmaps.size > 0) {
const annotationWithBitmaps = newAnnotations.slice();
for (const [key, annotation] of annotationStorage) {
if (!key.startsWith(AnnotationEditorPrefix)) {
continue;
}
if (annotation.bitmap && missingBitmaps.has(annotation.bitmapId)) {
annotationWithBitmaps.push(annotation);
}
}
imagePromises = AnnotationFactory.generateImages(annotationWithBitmaps, this.xref, isOffscreenCanvasSupported);
} else {
imagePromises = AnnotationFactory.generateImages(newAnnotations, this.xref, isOffscreenCanvasSupported);
}
deletedAnnotations = new RefSet();
this.#replaceIdByRef(newAnnotations, deletedAnnotations, null);
newAnnotationsPromise = annotationGlobalsPromise.then(annotationGlobals => {
if (!annotationGlobals) {
return null;
}
return AnnotationFactory.printNewAnnotations(annotationGlobals, partialEvaluator, task, newAnnotations, imagePromises);
});
} }
const {
isOffscreenCanvasSupported
} = this.evaluatorOptions;
if (missingBitmaps.size > 0) {
const annotationWithBitmaps = newAnnots.slice();
for (const [key, annotation] of annotationStorage) {
if (!key.startsWith(AnnotationEditorPrefix)) {
continue;
}
if (annotation.bitmap && missingBitmaps.has(annotation.bitmapId)) {
annotationWithBitmaps.push(annotation);
}
}
imagePromises = AnnotationFactory.generateImages(annotationWithBitmaps, this.xref, isOffscreenCanvasSupported);
} else {
imagePromises = AnnotationFactory.generateImages(newAnnots, this.xref, isOffscreenCanvasSupported);
}
deletedAnnotations = new RefSet();
this.#replaceIdByRef(newAnnots, deletedAnnotations, null);
newAnnotationsPromise = annotationGlobalsPromise.then(annotationGlobals => {
if (!annotationGlobals) {
return null;
}
return AnnotationFactory.printNewAnnotations(annotationGlobals, partialEvaluator, task, newAnnots, imagePromises);
});
} }
const dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); const pageListPromise = Promise.all([contentStreamPromise, resourcesPromise]).then(([contentStream]) => {
const pageListPromise = dataPromises.then(([contentStream]) => {
const opList = new OperatorList(intent, sink); const opList = new OperatorList(intent, sink);
handler.send("StartRenderPage", { handler.send("StartRenderPage", {
transparency: partialEvaluator.hasBlendModes(this.resources, this.nonBlendModesSet), transparency: partialEvaluator.hasBlendModes(this.resources, this.nonBlendModesSet),
@ -55532,7 +55530,7 @@ class WorkerMessageHandler {
docId, docId,
apiVersion apiVersion
} = docParams; } = docParams;
const workerVersion = "4.3.118"; const workerVersion = "4.3.136";
if (apiVersion !== workerVersion) { if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
} }
@ -56102,8 +56100,8 @@ if (typeof window === "undefined" && !isNodeJS && typeof self !== "undefined" &&
;// CONCATENATED MODULE: ./src/pdf.worker.js ;// CONCATENATED MODULE: ./src/pdf.worker.js
const pdfjsVersion = "4.3.118"; const pdfjsVersion = "4.3.136";
const pdfjsBuild = "17e09e547"; const pdfjsBuild = "0cec64437";
var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler; var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler;
export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler }; export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler };

File diff suppressed because one or more lines are too long

View file

@ -20,7 +20,7 @@ Adobe CMap resources are covered by their own copyright but the same license:
See https://github.com/adobe-type-tools/cmap-resources See https://github.com/adobe-type-tools/cmap-resources
--> -->
<html dir="ltr" mozdisallowselectionprint th:lang="${#locale.language}" th:data-language="${#locale.toString()}" xmlns:th="https://www.thymeleaf.org"> <html dir="ltr" mozdisallowselectionprint th:lang="${#locale.language}" th:data-language="${#locale.toString()}" xmlns:th="https://www.thymeleaf.org">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@ -461,8 +461,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="pdfjs-document-properties-close-button">Close</span></button> <button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="pdfjs-document-properties-close-button">Close</span></button>
</div> </div>
</dialog> </dialog>
<dialog id="altTextDialog" aria-labelledby="dialogLabel" aria-describedby="dialogDescription"> <dialog class="dialog altText" id="altTextDialog" aria-labelledby="dialogLabel" aria-describedby="dialogDescription">
<div id="altTextContainer"> <div id="altTextContainer" class="mainContainer">
<div id="overallDescription"> <div id="overallDescription">
<span id="dialogLabel" data-l10n-id="pdfjs-editor-alt-text-dialog-label" class="title">Choose an option</span> <span id="dialogLabel" data-l10n-id="pdfjs-editor-alt-text-dialog-label" class="title">Choose an option</span>
<span id="dialogDescription" data-l10n-id="pdfjs-editor-alt-text-dialog-description"> <span id="dialogDescription" data-l10n-id="pdfjs-editor-alt-text-dialog-description">
@ -499,8 +499,8 @@ See https://github.com/adobe-type-tools/cmap-resources
</div> </div>
</div> </div>
<div id="buttons"> <div id="buttons">
<button id="altTextCancel" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-cancel-button">Cancel</span></button> <button id="altTextCancel" class="secondaryButton" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-cancel-button">Cancel</span></button>
<button id="altTextSave" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-save-button">Save</span></button> <button id="altTextSave" class="primaryButton" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-save-button">Save</span></button>
</div> </div>
</div> </div>
</dialog> </dialog>