зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1860049 - Update PDF.js to new version 377af6892b6c9e22a5fc545dfd454ad73f411990 r=pdfjs-reviewers,marco
Depends on D190941 Differential Revision: https://phabricator.services.mozilla.com/D191431
This commit is contained in:
Родитель
b49b835102
Коммит
433f3998ce
|
@ -2838,7 +2838,7 @@ class AnnotationEditor {
|
|||
fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);
|
||||
}
|
||||
static initialize(l10n, options = null) {
|
||||
AnnotationEditor._l10nPromise ||= new Map(["editor_alt_text_button_label", "editor_alt_text_edit_button_label", "editor_alt_text_decorative_tooltip", "editor_resizer_label_topLeft", "editor_resizer_label_topMiddle", "editor_resizer_label_topRight", "editor_resizer_label_middleRight", "editor_resizer_label_bottomRight", "editor_resizer_label_bottomMiddle", "editor_resizer_label_bottomLeft", "editor_resizer_label_middleLeft"].map(str => [str, l10n.get(str)]));
|
||||
AnnotationEditor._l10nPromise ||= new Map(["pdfjs-editor-alt-text-button-label", "pdfjs-editor-alt-text-edit-button-label", "pdfjs-editor-alt-text-decorative-tooltip", "pdfjs-editor-resizer-label-topLeft", "pdfjs-editor-resizer-label-topMiddle", "pdfjs-editor-resizer-label-topRight", "pdfjs-editor-resizer-label-middleRight", "pdfjs-editor-resizer-label-bottomRight", "pdfjs-editor-resizer-label-bottomMiddle", "pdfjs-editor-resizer-label-bottomLeft", "pdfjs-editor-resizer-label-middleLeft"].map(str => [str, l10n.get(str.replaceAll(/([A-Z])/g, c => `-${c.toLowerCase()}`))]));
|
||||
if (options?.strings) {
|
||||
for (const str of options.strings) {
|
||||
AnnotationEditor._l10nPromise.set(str, l10n.get(str));
|
||||
|
@ -3326,7 +3326,7 @@ class AnnotationEditor {
|
|||
}
|
||||
const altText = this.#altTextButton = document.createElement("button");
|
||||
altText.className = "altText";
|
||||
const msg = await AnnotationEditor._l10nPromise.get("editor_alt_text_button_label");
|
||||
const msg = await AnnotationEditor._l10nPromise.get("pdfjs-editor-alt-text-button-label");
|
||||
altText.textContent = msg;
|
||||
altText.setAttribute("aria-label", msg);
|
||||
altText.tabIndex = "0";
|
||||
|
@ -3364,7 +3364,7 @@ class AnnotationEditor {
|
|||
return;
|
||||
}
|
||||
button.classList.add("done");
|
||||
AnnotationEditor._l10nPromise.get("editor_alt_text_edit_button_label").then(msg => {
|
||||
AnnotationEditor._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(msg => {
|
||||
button.setAttribute("aria-label", msg);
|
||||
});
|
||||
let tooltip = this.#altTextTooltip;
|
||||
|
@ -3399,7 +3399,7 @@ class AnnotationEditor {
|
|||
this.#altTextTooltip?.classList.remove("show");
|
||||
});
|
||||
}
|
||||
tooltip.innerText = this.#altTextDecorative ? await AnnotationEditor._l10nPromise.get("editor_alt_text_decorative_tooltip") : this.#altText;
|
||||
tooltip.innerText = this.#altTextDecorative ? await AnnotationEditor._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip") : this.#altText;
|
||||
if (!tooltip.parentNode) {
|
||||
button.append(tooltip);
|
||||
}
|
||||
|
@ -3663,7 +3663,7 @@ class AnnotationEditor {
|
|||
div.addEventListener("keydown", boundResizerKeydown);
|
||||
div.addEventListener("blur", boundResizerBlur);
|
||||
div.addEventListener("focus", this.#resizerFocus.bind(this, name));
|
||||
AnnotationEditor._l10nPromise.get(`editor_resizer_label_${name}`).then(msg => div.setAttribute("aria-label", msg));
|
||||
AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => div.setAttribute("aria-label", msg));
|
||||
}
|
||||
}
|
||||
const first = this.#allResizerDivs[0];
|
||||
|
@ -3689,7 +3689,7 @@ class AnnotationEditor {
|
|||
for (const child of children) {
|
||||
const div = this.#allResizerDivs[i++];
|
||||
const name = div.getAttribute("data-resizer-name");
|
||||
AnnotationEditor._l10nPromise.get(`editor_resizer_label_${name}`).then(msg => child.setAttribute("aria-label", msg));
|
||||
AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => child.setAttribute("aria-label", msg));
|
||||
}
|
||||
}
|
||||
this.#setResizerTabIndex(0);
|
||||
|
@ -5690,15 +5690,13 @@ class CanvasGraphics {
|
|||
}
|
||||
let maskToCanvas = Util.transform(currentTransform, [1 / width, 0, 0, -1 / height, 0, 0]);
|
||||
maskToCanvas = Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);
|
||||
const cord1 = Util.applyTransform([0, 0], maskToCanvas);
|
||||
const cord2 = Util.applyTransform([width, height], maskToCanvas);
|
||||
const rect = Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);
|
||||
const drawnWidth = Math.round(rect[2] - rect[0]) || 1;
|
||||
const drawnHeight = Math.round(rect[3] - rect[1]) || 1;
|
||||
const [minX, minY, maxX, maxY] = Util.getAxialAlignedBoundingBox([0, 0, width, height], maskToCanvas);
|
||||
const drawnWidth = Math.round(maxX - minX) || 1;
|
||||
const drawnHeight = Math.round(maxY - minY) || 1;
|
||||
const fillCanvas = this.cachedCanvases.getCanvas("fillCanvas", drawnWidth, drawnHeight);
|
||||
const fillCtx = fillCanvas.context;
|
||||
const offsetX = Math.min(cord1[0], cord2[0]);
|
||||
const offsetY = Math.min(cord1[1], cord2[1]);
|
||||
const offsetX = minX;
|
||||
const offsetY = minY;
|
||||
fillCtx.translate(-offsetX, -offsetY);
|
||||
fillCtx.transform(...maskToCanvas);
|
||||
if (!scaled) {
|
||||
|
@ -8048,7 +8046,7 @@ function getDocument(src) {
|
|||
}
|
||||
const fetchDocParams = {
|
||||
docId,
|
||||
apiVersion: '4.0.67',
|
||||
apiVersion: '4.0.107',
|
||||
data,
|
||||
password,
|
||||
disableAutoFetch,
|
||||
|
@ -9672,8 +9670,8 @@ class InternalRenderTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
const version = '4.0.67';
|
||||
const build = '5c45dfa0a';
|
||||
const version = '4.0.107';
|
||||
const build = '377af6892';
|
||||
|
||||
;// CONCATENATED MODULE: ./src/display/text_layer.js
|
||||
|
||||
|
@ -10291,7 +10289,6 @@ class XfaLayer {
|
|||
|
||||
|
||||
|
||||
|
||||
const DEFAULT_TAB_INDEX = 1000;
|
||||
const annotation_layer_DEFAULT_FONT_SIZE = 9;
|
||||
const GetElementsByNameSet = new WeakSet();
|
||||
|
@ -10900,7 +10897,7 @@ class LinkAnnotationElement extends AnnotationElement {
|
|||
#bindAttachment(link, attachment, dest = null) {
|
||||
link.href = this.linkService.getAnchorUrl("");
|
||||
link.onclick = () => {
|
||||
this.downloadManager?.openOrDownloadData(this.container, attachment.content, attachment.filename, dest);
|
||||
this.downloadManager?.openOrDownloadData(attachment.content, attachment.filename, dest);
|
||||
return false;
|
||||
};
|
||||
this.#setInternalLink();
|
||||
|
@ -11050,11 +11047,10 @@ class TextAnnotationElement extends AnnotationElement {
|
|||
this.container.classList.add("textAnnotation");
|
||||
const image = document.createElement("img");
|
||||
image.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg";
|
||||
image.alt = "[{{type}} Annotation]";
|
||||
image.dataset.l10nId = "text_annotation_type";
|
||||
image.dataset.l10nArgs = JSON.stringify({
|
||||
image.setAttribute("data-l10n-id", "pdfjs-text-annotation-type");
|
||||
image.setAttribute("data-l10n-args", JSON.stringify({
|
||||
type: this.data.name
|
||||
});
|
||||
}));
|
||||
if (!this.data.popupRef && this.hasPopupData) {
|
||||
this._createPopup();
|
||||
}
|
||||
|
@ -11932,7 +11928,6 @@ class PopupAnnotationElement extends AnnotationElement {
|
|||
}
|
||||
}
|
||||
class PopupElement {
|
||||
#dateTimePromise = null;
|
||||
#boundKeyDown = this.#keyDown.bind(this);
|
||||
#boundHide = this.#hide.bind(this);
|
||||
#boundShow = this.#show.bind(this);
|
||||
|
@ -11940,6 +11935,7 @@ class PopupElement {
|
|||
#color = null;
|
||||
#container = null;
|
||||
#contentsObj = null;
|
||||
#dateObj = null;
|
||||
#elements = null;
|
||||
#parent = null;
|
||||
#parentRect = null;
|
||||
|
@ -11971,13 +11967,7 @@ class PopupElement {
|
|||
this.#rect = rect;
|
||||
this.#parentRect = parentRect;
|
||||
this.#elements = elements;
|
||||
const dateObject = PDFDateString.toDateObject(modificationDate);
|
||||
if (dateObject) {
|
||||
this.#dateTimePromise = parent.l10n.get("annotation_date_string", {
|
||||
date: dateObject.toLocaleDateString(),
|
||||
time: dateObject.toLocaleTimeString()
|
||||
});
|
||||
}
|
||||
this.#dateObj = PDFDateString.toDateObject(modificationDate);
|
||||
this.trigger = elements.flatMap(e => e.getElementsToTriggerPopup());
|
||||
for (const element of this.trigger) {
|
||||
element.addEventListener("click", this.#boundToggle);
|
||||
|
@ -12025,12 +12015,14 @@ class PopupElement {
|
|||
str: title.textContent
|
||||
} = this.#titleObj);
|
||||
popup.append(header);
|
||||
if (this.#dateTimePromise) {
|
||||
if (this.#dateObj) {
|
||||
const modificationDate = document.createElement("span");
|
||||
modificationDate.classList.add("popupDate");
|
||||
this.#dateTimePromise.then(localized => {
|
||||
modificationDate.textContent = localized;
|
||||
});
|
||||
modificationDate.setAttribute("data-l10n-id", "pdfjs-annotation-date-string");
|
||||
modificationDate.setAttribute("data-l10n-args", JSON.stringify({
|
||||
date: this.#dateObj.toLocaleDateString(),
|
||||
time: this.#dateObj.toLocaleTimeString()
|
||||
}));
|
||||
header.append(modificationDate);
|
||||
}
|
||||
const contentsObj = this.#contentsObj;
|
||||
|
@ -12542,7 +12534,7 @@ class FileAttachmentAnnotationElement extends AnnotationElement {
|
|||
this.container.classList.add("highlightArea");
|
||||
}
|
||||
#download() {
|
||||
this.downloadManager?.openOrDownloadData(this.container, this.content, this.filename);
|
||||
this.downloadManager?.openOrDownloadData(this.content, this.filename);
|
||||
}
|
||||
}
|
||||
class AnnotationLayer {
|
||||
|
@ -12553,14 +12545,12 @@ class AnnotationLayer {
|
|||
div,
|
||||
accessibilityManager,
|
||||
annotationCanvasMap,
|
||||
l10n,
|
||||
page,
|
||||
viewport
|
||||
}) {
|
||||
this.div = div;
|
||||
this.#accessibilityManager = accessibilityManager;
|
||||
this.#annotationCanvasMap = annotationCanvasMap;
|
||||
this.l10n = l10n;
|
||||
this.page = page;
|
||||
this.viewport = viewport;
|
||||
this.zIndex = 0;
|
||||
|
@ -12636,7 +12626,6 @@ class AnnotationLayer {
|
|||
this.#appendElement(rendered, data.id);
|
||||
}
|
||||
this.#setAnnotationCanvasMap();
|
||||
await this.l10n.translate(layer);
|
||||
}
|
||||
update({
|
||||
viewport
|
||||
|
@ -12744,7 +12733,7 @@ class FreeTextEditor extends AnnotationEditor {
|
|||
}
|
||||
static initialize(l10n) {
|
||||
AnnotationEditor.initialize(l10n, {
|
||||
strings: ["free_text2_default_content", "editor_free_text2_aria_label"]
|
||||
strings: ["pdfjs-free-text-default-content"]
|
||||
});
|
||||
const style = getComputedStyle(document.documentElement);
|
||||
this._internalPadding = parseFloat(style.getPropertyValue("--freetext-padding"));
|
||||
|
@ -13016,9 +13005,9 @@ class FreeTextEditor extends AnnotationEditor {
|
|||
this.editorDiv = document.createElement("div");
|
||||
this.editorDiv.className = "internal";
|
||||
this.editorDiv.setAttribute("id", this.#editorDivId);
|
||||
this.editorDiv.setAttribute("data-l10n-id", "pdfjs-free-text");
|
||||
this.enableEditing();
|
||||
AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(msg => this.editorDiv?.setAttribute("aria-label", msg));
|
||||
AnnotationEditor._l10nPromise.get("free_text2_default_content").then(msg => this.editorDiv?.setAttribute("default-content", msg));
|
||||
AnnotationEditor._l10nPromise.get("pdfjs-free-text-default-content").then(msg => this.editorDiv?.setAttribute("default-content", msg));
|
||||
this.editorDiv.contentEditable = true;
|
||||
const {
|
||||
style
|
||||
|
@ -13237,9 +13226,7 @@ class InkEditor extends AnnotationEditor {
|
|||
this._willKeepAspectRatio = true;
|
||||
}
|
||||
static initialize(l10n) {
|
||||
AnnotationEditor.initialize(l10n, {
|
||||
strings: ["editor_ink_canvas_aria_label", "editor_ink2_aria_label"]
|
||||
});
|
||||
AnnotationEditor.initialize(l10n);
|
||||
}
|
||||
static updateDefaultParams(type, value) {
|
||||
switch (type) {
|
||||
|
@ -13667,7 +13654,7 @@ class InkEditor extends AnnotationEditor {
|
|||
this.canvas = document.createElement("canvas");
|
||||
this.canvas.width = this.canvas.height = 0;
|
||||
this.canvas.className = "inkEditorCanvas";
|
||||
AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(msg => this.canvas?.setAttribute("aria-label", msg));
|
||||
this.canvas.setAttribute("data-l10n-id", "pdfjs-ink-canvas");
|
||||
this.div.append(this.canvas);
|
||||
this.ctx = this.canvas.getContext("2d");
|
||||
}
|
||||
|
@ -13693,7 +13680,7 @@ class InkEditor extends AnnotationEditor {
|
|||
baseY = this.y;
|
||||
}
|
||||
super.render();
|
||||
AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(msg => this.div?.setAttribute("aria-label", msg));
|
||||
this.div.setAttribute("data-l10n-id", "pdfjs-ink");
|
||||
const [x, y, w, h] = this.#getInitialBBox();
|
||||
this.setAt(x, y, 0, 0);
|
||||
this.setDims(w, h);
|
||||
|
@ -14856,8 +14843,8 @@ class AnnotationEditorLayer {
|
|||
|
||||
|
||||
|
||||
const pdfjsVersion = '4.0.67';
|
||||
const pdfjsBuild = '5c45dfa0a';
|
||||
const pdfjsVersion = '4.0.107';
|
||||
const pdfjsBuild = '377af6892';
|
||||
|
||||
var __webpack_exports__AbortException = __webpack_exports__.AbortException;
|
||||
var __webpack_exports__AnnotationEditorLayer = __webpack_exports__.AnnotationEditorLayer;
|
||||
|
|
|
@ -3996,8 +3996,8 @@ function initSandbox(params) {
|
|||
|
||||
;// CONCATENATED MODULE: ./src/pdf.scripting.js
|
||||
|
||||
const pdfjsVersion = '4.0.67';
|
||||
const pdfjsBuild = '5c45dfa0a';
|
||||
const pdfjsVersion = '4.0.107';
|
||||
const pdfjsBuild = '377af6892';
|
||||
globalThis.pdfjsScripting = {
|
||||
initSandbox: initSandbox
|
||||
};
|
||||
|
|
|
@ -37180,7 +37180,7 @@ async function writeDict(dict, buffer, transform) {
|
|||
buffer.push(">>");
|
||||
}
|
||||
async function writeStream(stream, buffer, transform) {
|
||||
let string = stream.getString();
|
||||
let bytes = stream.getBytes();
|
||||
const {
|
||||
dict
|
||||
} = stream;
|
||||
|
@ -37188,15 +37188,14 @@ async function writeStream(stream, buffer, transform) {
|
|||
const filterZero = Array.isArray(filter) ? await dict.xref.fetchIfRefAsync(filter[0]) : filter;
|
||||
const isFilterZeroFlateDecode = isName(filterZero, "FlateDecode");
|
||||
const MIN_LENGTH_FOR_COMPRESSING = 256;
|
||||
if (typeof CompressionStream !== "undefined" && (string.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode)) {
|
||||
if (typeof CompressionStream !== "undefined" && (bytes.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode)) {
|
||||
try {
|
||||
const byteArray = stringToBytes(string);
|
||||
const cs = new CompressionStream("deflate");
|
||||
const writer = cs.writable.getWriter();
|
||||
writer.write(byteArray);
|
||||
writer.write(bytes);
|
||||
writer.close();
|
||||
const buf = await new Response(cs.readable).arrayBuffer();
|
||||
string = bytesToString(new Uint8Array(buf));
|
||||
bytes = new Uint8Array(buf);
|
||||
let newFilter, newParams;
|
||||
if (!filter) {
|
||||
newFilter = Name.get("FlateDecode");
|
||||
|
@ -37216,6 +37215,7 @@ async function writeStream(stream, buffer, transform) {
|
|||
info(`writeStream - cannot compress data: "${ex}".`);
|
||||
}
|
||||
}
|
||||
let string = bytesToString(bytes);
|
||||
if (transform) {
|
||||
string = transform.encryptString(string);
|
||||
}
|
||||
|
@ -56349,7 +56349,7 @@ class WorkerMessageHandler {
|
|||
docId,
|
||||
apiVersion
|
||||
} = docParams;
|
||||
const workerVersion = '4.0.67';
|
||||
const workerVersion = '4.0.107';
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
}
|
||||
|
@ -56910,8 +56910,8 @@ if (typeof window === "undefined" && !isNodeJS && typeof self !== "undefined" &&
|
|||
|
||||
;// CONCATENATED MODULE: ./src/pdf.worker.js
|
||||
|
||||
const pdfjsVersion = '4.0.67';
|
||||
const pdfjsBuild = '5c45dfa0a';
|
||||
const pdfjsVersion = '4.0.107';
|
||||
const pdfjsBuild = '377af6892';
|
||||
|
||||
var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler;
|
||||
export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler };
|
||||
|
|
|
@ -30,6 +30,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<script src="resource://pdf.js/build/pdf.mjs" type="module"></script>
|
||||
|
||||
<link rel="stylesheet" href="resource://pdf.js/web/viewer.css">
|
||||
<link rel="localization" href="toolkit/pdfviewer/viewer.ftl"/>
|
||||
|
||||
<script src="resource://pdf.js/web/viewer.mjs" type="module"></script>
|
||||
|
||||
|
@ -41,11 +42,11 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="mainContainer">
|
||||
|
||||
<div id="floatingToolbar">
|
||||
<button id="download" class="toolbarButton" title="Download" tabindex="31" data-l10n-id="download_button">
|
||||
<span data-l10n-id="download_button_label">Download</span>
|
||||
<button id="download" class="toolbarButton" title="Download" tabindex="31" data-l10n-id="pdfjs-download-button">
|
||||
<span data-l10n-id="pdfjs-download-button-label">Download</span>
|
||||
</button>
|
||||
<button id="openInApp" class="toolbarButton" title="Open in app" tabindex="32" data-l10n-id="open_in_app">
|
||||
<span data-l10n-id="open_in_app_label">Open in app</span>
|
||||
<button id="openInApp" class="toolbarButton" title="Open in app" tabindex="32" data-l10n-id="pdfjs-open-in-app-button">
|
||||
<span data-l10n-id="pdfjs-open-in-app-button-label">Open in app</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
@ -57,14 +58,14 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="dialogContainer">
|
||||
<dialog id="passwordDialog">
|
||||
<div class="row">
|
||||
<label for="password" id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</label>
|
||||
<label for="password" id="passwordText" data-l10n-id="pdfjs-password-label">Enter the password to open this PDF file:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="password" id="password" class="toolbarField">
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="pdfjs-password-cancel-button">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="pdfjs-password-ok-button">OK</span></button>
|
||||
</div>
|
||||
</dialog>
|
||||
</div> <!-- dialogContainer -->
|
||||
|
|
|
@ -51,100 +51,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|||
PDFViewerApplicationOptions: () => (/* reexport */ AppOptions)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ./extensions/firefox/tools/l10n.js
|
||||
|
||||
|
||||
(function (window) {
|
||||
let gL10nData = null;
|
||||
let gLanguage = "";
|
||||
let gExternalLocalizerServices = null;
|
||||
let gReadyState = "loading";
|
||||
function getL10nData(key) {
|
||||
gL10nData ||= gExternalLocalizerServices.getStrings();
|
||||
const data = gL10nData?.[key];
|
||||
if (!data) {
|
||||
console.warn("[l10n] #" + key + " missing for [" + gLanguage + "]");
|
||||
}
|
||||
return data;
|
||||
}
|
||||
function substArguments(text, args) {
|
||||
if (!args) {
|
||||
return text;
|
||||
}
|
||||
return text.replaceAll(/\{\{\s*(\w+)\s*\}\}/g, function (all, name) {
|
||||
return name in args ? args[name] : "{{" + name + "}}";
|
||||
});
|
||||
}
|
||||
function translateString(key, args, fallback) {
|
||||
const i = key.lastIndexOf(".");
|
||||
let name, property;
|
||||
if (i >= 0) {
|
||||
name = key.substring(0, i);
|
||||
property = key.substring(i + 1);
|
||||
} else {
|
||||
name = key;
|
||||
property = "textContent";
|
||||
}
|
||||
const data = getL10nData(name);
|
||||
const value = data?.[property] || fallback;
|
||||
if (!value) {
|
||||
return "{{" + key + "}}";
|
||||
}
|
||||
return substArguments(value, args);
|
||||
}
|
||||
function translateElement(element) {
|
||||
if (!element?.dataset) {
|
||||
return;
|
||||
}
|
||||
const key = element.dataset.l10nId;
|
||||
const data = getL10nData(key);
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
let args;
|
||||
if (element.dataset.l10nArgs) {
|
||||
try {
|
||||
args = JSON.parse(element.dataset.l10nArgs);
|
||||
} catch {
|
||||
console.warn("[l10n] could not parse arguments for #" + key + "");
|
||||
}
|
||||
}
|
||||
for (const k in data) {
|
||||
element[k] = substArguments(data[k], args);
|
||||
}
|
||||
}
|
||||
function translateFragment(element) {
|
||||
element ||= document.querySelector("html");
|
||||
const children = element.querySelectorAll("*[data-l10n-id]");
|
||||
const elementCount = children.length;
|
||||
for (let i = 0; i < elementCount; i++) {
|
||||
translateElement(children[i]);
|
||||
}
|
||||
if (element.dataset.l10nId) {
|
||||
translateElement(element);
|
||||
}
|
||||
}
|
||||
document.mozL10n = {
|
||||
get: translateString,
|
||||
getLanguage() {
|
||||
return gLanguage;
|
||||
},
|
||||
getDirection() {
|
||||
const rtlList = ["ar", "he", "fa", "ps", "ur"];
|
||||
const shortCode = gLanguage.split("-")[0];
|
||||
return rtlList.includes(shortCode) ? "rtl" : "ltr";
|
||||
},
|
||||
getReadyState() {
|
||||
return gReadyState;
|
||||
},
|
||||
setExternalLocalizerServices(externalLocalizerServices) {
|
||||
gExternalLocalizerServices = externalLocalizerServices;
|
||||
gLanguage = gExternalLocalizerServices.getLocale();
|
||||
gReadyState = "complete";
|
||||
},
|
||||
translate: translateFragment
|
||||
};
|
||||
})(undefined);
|
||||
;// CONCATENATED MODULE: ./web/ui_utils.js
|
||||
const DEFAULT_SCALE_VALUE = "auto";
|
||||
const DEFAULT_SCALE = 1.0;
|
||||
|
@ -903,7 +809,7 @@ class AppOptions {
|
|||
static set(name, value) {
|
||||
userOptions[name] = value;
|
||||
}
|
||||
static setAll(options) {
|
||||
static setAll(options, init = false) {
|
||||
for (const name in options) {
|
||||
userOptions[name] = options[name];
|
||||
}
|
||||
|
@ -912,7 +818,6 @@ class AppOptions {
|
|||
delete userOptions[name];
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
;// CONCATENATED MODULE: ./web/event_utils.js
|
||||
const WaitOnType = {
|
||||
|
@ -1539,14 +1444,13 @@ class PasswordPrompt {
|
|||
#activeCapability = null;
|
||||
#updateCallback = null;
|
||||
#reason = null;
|
||||
constructor(options, overlayManager, l10n, isViewerEmbedded = false) {
|
||||
constructor(options, overlayManager, isViewerEmbedded = false) {
|
||||
this.dialog = options.dialog;
|
||||
this.label = options.label;
|
||||
this.input = options.input;
|
||||
this.submitButton = options.submitButton;
|
||||
this.cancelButton = options.cancelButton;
|
||||
this.overlayManager = overlayManager;
|
||||
this.l10n = l10n;
|
||||
this._isViewerEmbedded = isViewerEmbedded;
|
||||
this.submitButton.addEventListener("click", this.#verify.bind(this));
|
||||
this.cancelButton.addEventListener("click", this.close.bind(this));
|
||||
|
@ -1573,7 +1477,7 @@ class PasswordPrompt {
|
|||
if (!this._isViewerEmbedded || passwordIncorrect) {
|
||||
this.input.focus();
|
||||
}
|
||||
this.label.textContent = await this.l10n.get(`password_${passwordIncorrect ? "invalid" : "label"}`);
|
||||
this.label.setAttribute("data-l10n-id", `pdfjs-password-${passwordIncorrect ? "invalid" : "label"}`);
|
||||
}
|
||||
async close() {
|
||||
if (this.overlayManager.active === this.dialog) {
|
||||
|
@ -3343,98 +3247,8 @@ class PDFScriptingManager {
|
|||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./web/l10n_utils.js
|
||||
const DEFAULT_L10N_STRINGS = {
|
||||
of_pages: "of {{pagesCount}}",
|
||||
page_of_pages: "({{pageNumber}} of {{pagesCount}})",
|
||||
document_properties_kb: "{{size_kb}} KB ({{size_b}} bytes)",
|
||||
document_properties_mb: "{{size_mb}} MB ({{size_b}} bytes)",
|
||||
document_properties_date_string: "{{date}}, {{time}}",
|
||||
document_properties_page_size_unit_inches: "in",
|
||||
document_properties_page_size_unit_millimeters: "mm",
|
||||
document_properties_page_size_orientation_portrait: "portrait",
|
||||
document_properties_page_size_orientation_landscape: "landscape",
|
||||
document_properties_page_size_name_a3: "A3",
|
||||
document_properties_page_size_name_a4: "A4",
|
||||
document_properties_page_size_name_letter: "Letter",
|
||||
document_properties_page_size_name_legal: "Legal",
|
||||
document_properties_page_size_dimension_string: "{{width}} × {{height}} {{unit}} ({{orientation}})",
|
||||
document_properties_page_size_dimension_name_string: "{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",
|
||||
document_properties_linearized_yes: "Yes",
|
||||
document_properties_linearized_no: "No",
|
||||
additional_layers: "Additional Layers",
|
||||
page_landmark: "Page {{page}}",
|
||||
thumb_page_title: "Page {{page}}",
|
||||
thumb_page_canvas: "Thumbnail of Page {{page}}",
|
||||
find_reached_top: "Reached top of document, continued from bottom",
|
||||
find_reached_bottom: "Reached end of document, continued from top",
|
||||
"find_match_count[one]": "{{current}} of {{total}} match",
|
||||
"find_match_count[other]": "{{current}} of {{total}} matches",
|
||||
"find_match_count_limit[one]": "More than {{limit}} match",
|
||||
"find_match_count_limit[other]": "More than {{limit}} matches",
|
||||
find_not_found: "Phrase not found",
|
||||
page_scale_width: "Page Width",
|
||||
page_scale_fit: "Page Fit",
|
||||
page_scale_auto: "Automatic Zoom",
|
||||
page_scale_actual: "Actual Size",
|
||||
page_scale_percent: "{{scale}}%",
|
||||
loading_error: "An error occurred while loading the PDF.",
|
||||
invalid_file_error: "Invalid or corrupted PDF file.",
|
||||
missing_file_error: "Missing PDF file.",
|
||||
unexpected_response_error: "Unexpected server response.",
|
||||
rendering_error: "An error occurred while rendering the page.",
|
||||
annotation_date_string: "{{date}}, {{time}}",
|
||||
printing_not_supported: "Warning: Printing is not fully supported by this browser.",
|
||||
printing_not_ready: "Warning: The PDF is not fully loaded for printing.",
|
||||
web_fonts_disabled: "Web fonts are disabled: unable to use embedded PDF fonts.",
|
||||
free_text2_default_content: "Start typing…",
|
||||
editor_free_text2_aria_label: "Text Editor",
|
||||
editor_ink2_aria_label: "Draw Editor",
|
||||
editor_ink_canvas_aria_label: "User-created image",
|
||||
editor_alt_text_button_label: "Alt text",
|
||||
editor_alt_text_edit_button_label: "Edit alt text",
|
||||
editor_alt_text_decorative_tooltip: "Marked as decorative",
|
||||
editor_resizer_label_topLeft: "Top left corner — resize",
|
||||
editor_resizer_label_topMiddle: "Top middle — resize",
|
||||
editor_resizer_label_topRight: "Top right corner — resize",
|
||||
editor_resizer_label_middleRight: "Middle right — resize",
|
||||
editor_resizer_label_bottomRight: "Bottom right corner — resize",
|
||||
editor_resizer_label_bottomMiddle: "Bottom middle — resize",
|
||||
editor_resizer_label_bottomLeft: "Bottom left corner — resize",
|
||||
editor_resizer_label_middleLeft: "Middle left — resize"
|
||||
};
|
||||
;
|
||||
function getL10nFallback(key, args) {
|
||||
switch (key) {
|
||||
case "find_match_count":
|
||||
key = `find_match_count[${args.total === 1 ? "one" : "other"}]`;
|
||||
break;
|
||||
case "find_match_count_limit":
|
||||
key = `find_match_count_limit[${args.limit === 1 ? "one" : "other"}]`;
|
||||
break;
|
||||
}
|
||||
return DEFAULT_L10N_STRINGS[key] || "";
|
||||
}
|
||||
function formatL10nValue(text, args) {
|
||||
if (!args) {
|
||||
return text;
|
||||
}
|
||||
return text.replaceAll(/\{\{\s*(\w+)\s*\}\}/g, (all, name) => {
|
||||
return name in args ? args[name] : "{{" + name + "}}";
|
||||
});
|
||||
}
|
||||
const NullL10n = {
|
||||
async getLanguage() {
|
||||
return "en-us";
|
||||
},
|
||||
async getDirection() {
|
||||
return "ltr";
|
||||
},
|
||||
async get(key, args = null, fallback = getL10nFallback(key, args)) {
|
||||
return formatL10nValue(fallback, args);
|
||||
},
|
||||
async translate(element) {}
|
||||
};
|
||||
;// CONCATENATED MODULE: ./web/stubs.js
|
||||
const NullL10n = null;
|
||||
|
||||
;// CONCATENATED MODULE: ./web/annotation_editor_layer_builder.js
|
||||
|
||||
|
@ -3520,7 +3334,6 @@ class AnnotationEditorLayerBuilder {
|
|||
;// CONCATENATED MODULE: ./web/annotation_layer_builder.js
|
||||
|
||||
|
||||
|
||||
class AnnotationLayerBuilder {
|
||||
#onPresentationModeChanged = null;
|
||||
constructor({
|
||||
|
@ -3531,7 +3344,6 @@ class AnnotationLayerBuilder {
|
|||
annotationStorage = null,
|
||||
imageResourcesPath = "",
|
||||
renderForms = true,
|
||||
l10n = NullL10n,
|
||||
enableScripting = false,
|
||||
hasJSActionsPromise = null,
|
||||
fieldObjectsPromise = null,
|
||||
|
@ -3544,7 +3356,6 @@ class AnnotationLayerBuilder {
|
|||
this.downloadManager = downloadManager;
|
||||
this.imageResourcesPath = imageResourcesPath;
|
||||
this.renderForms = renderForms;
|
||||
this.l10n = l10n;
|
||||
this.annotationStorage = annotationStorage;
|
||||
this.enableScripting = enableScripting;
|
||||
this._hasJSActionsPromise = hasJSActionsPromise || Promise.resolve(false);
|
||||
|
@ -3585,7 +3396,6 @@ class AnnotationLayerBuilder {
|
|||
div,
|
||||
accessibilityManager: this._accessibilityManager,
|
||||
annotationCanvasMap: this._annotationCanvasMap,
|
||||
l10n: this.l10n,
|
||||
page: this.pdfPage,
|
||||
viewport: viewport.clone({
|
||||
dontFlip: true
|
||||
|
@ -4410,11 +4220,10 @@ class PDFPageView {
|
|||
div.className = "page";
|
||||
div.setAttribute("data-page-number", this.id);
|
||||
div.setAttribute("role", "region");
|
||||
this.l10n.get("page_landmark", {
|
||||
div.setAttribute("data-l10n-id", "pdfjs-page-landmark");
|
||||
div.setAttribute("data-l10n-args", JSON.stringify({
|
||||
page: this.id
|
||||
}).then(msg => {
|
||||
div.setAttribute("aria-label", msg);
|
||||
});
|
||||
}));
|
||||
this.div = div;
|
||||
this.#setDimensions();
|
||||
container?.append(div);
|
||||
|
@ -4911,7 +4720,6 @@ class PDFPageView {
|
|||
renderForms: this.#annotationMode === AnnotationMode.ENABLE_FORMS,
|
||||
linkService,
|
||||
downloadManager,
|
||||
l10n,
|
||||
enableScripting,
|
||||
hasJSActionsPromise,
|
||||
fieldObjectsPromise,
|
||||
|
@ -5040,6 +4848,9 @@ class PDFPageView {
|
|||
}
|
||||
setPageLabel(label) {
|
||||
this.pageLabel = typeof label === "string" ? label : null;
|
||||
this.div.setAttribute("data-l10n-args", JSON.stringify({
|
||||
page: this.pageLabel ?? this.id
|
||||
}));
|
||||
if (this.pageLabel !== null) {
|
||||
this.div.setAttribute("data-page-label", this.pageLabel);
|
||||
} else {
|
||||
|
@ -5139,7 +4950,7 @@ class PDFViewer {
|
|||
#scaleTimeoutId = null;
|
||||
#textLayerMode = TextLayerMode.ENABLE;
|
||||
constructor(options) {
|
||||
const viewerVersion = '4.0.67';
|
||||
const viewerVersion = '4.0.107';
|
||||
if (version !== viewerVersion) {
|
||||
throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`);
|
||||
}
|
||||
|
@ -6519,7 +6330,7 @@ class PDFViewer {
|
|||
class Toolbar {
|
||||
#buttons;
|
||||
#eventBus;
|
||||
constructor(options, eventBus, _l10n, nimbusData) {
|
||||
constructor(options, eventBus, nimbusData) {
|
||||
this.#eventBus = eventBus;
|
||||
const buttons = [{
|
||||
element: options.download,
|
||||
|
@ -6703,7 +6514,7 @@ class DefaultExternalServices {
|
|||
static createPreferences() {
|
||||
throw new Error("Not implemented: createPreferences");
|
||||
}
|
||||
static createL10n(options) {
|
||||
static async createL10n() {
|
||||
throw new Error("Not implemented: createL10n");
|
||||
}
|
||||
static createScripting(options) {
|
||||
|
@ -6791,36 +6602,29 @@ const PDFViewerApplication = {
|
|||
_isCtrlKeyDown: false,
|
||||
_nimbusDataPromise: null,
|
||||
async initialize(appConfig) {
|
||||
this.preferences = this.externalServices.createPreferences();
|
||||
let l10nPromise;
|
||||
l10nPromise = this.externalServices.createL10n();
|
||||
this.appConfig = appConfig;
|
||||
this._nimbusDataPromise = this.externalServices.getNimbusExperimentData();
|
||||
await this._initializeOptions();
|
||||
try {
|
||||
await this.preferences.initializedPromise;
|
||||
} catch (ex) {
|
||||
console.error(`initialize: "${ex.message}".`);
|
||||
}
|
||||
if (AppOptions.get("pdfBugEnabled")) {
|
||||
await this._parseHashParams();
|
||||
}
|
||||
this._forceCssTheme();
|
||||
await this._initializeL10n();
|
||||
this.l10n = await l10nPromise;
|
||||
document.getElementsByTagName("html")[0].dir = this.l10n.getDirection();
|
||||
if (this.isViewerEmbedded && AppOptions.get("externalLinkTarget") === LinkTarget.NONE) {
|
||||
AppOptions.set("externalLinkTarget", LinkTarget.TOP);
|
||||
}
|
||||
await this._initializeViewerComponents();
|
||||
this.bindEvents();
|
||||
this.bindWindowEvents();
|
||||
const appContainer = appConfig.appContainer || document.documentElement;
|
||||
this.l10n.translate(appContainer).then(() => {
|
||||
this.eventBus.dispatch("localized", {
|
||||
source: this
|
||||
});
|
||||
});
|
||||
this._initializedCapability.resolve();
|
||||
},
|
||||
async _initializeOptions() {
|
||||
try {
|
||||
AppOptions.setAll(await this.preferences.getAll());
|
||||
} catch (reason) {
|
||||
console.error(`_initializeOptions: "${reason.message}".`);
|
||||
}
|
||||
if (AppOptions.get("pdfBugEnabled")) {
|
||||
await this._parseHashParams();
|
||||
}
|
||||
},
|
||||
async _parseHashParams() {
|
||||
const hash = document.location.hash.substring(1);
|
||||
if (!hash) {
|
||||
|
@ -6886,11 +6690,6 @@ const PDFViewerApplication = {
|
|||
}
|
||||
}
|
||||
},
|
||||
async _initializeL10n() {
|
||||
this.l10n = this.externalServices.createL10n(null);
|
||||
const dir = await this.l10n.getDirection();
|
||||
document.getElementsByTagName("html")[0].dir = dir;
|
||||
},
|
||||
_forceCssTheme() {
|
||||
const cssTheme = AppOptions.get("viewerCssTheme");
|
||||
if (cssTheme === ViewerCssTheme.AUTOMATIC || !Object.values(ViewerCssTheme).includes(cssTheme)) {
|
||||
|
@ -6992,7 +6791,6 @@ const PDFViewerApplication = {
|
|||
eventBus,
|
||||
renderingQueue: pdfRenderingQueue,
|
||||
linkService: pdfLinkService,
|
||||
l10n,
|
||||
pageColors
|
||||
});
|
||||
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
|
||||
|
@ -7005,7 +6803,7 @@ const PDFViewerApplication = {
|
|||
pdfLinkService.setHistory(this.pdfHistory);
|
||||
}
|
||||
if (!this.supportsIntegratedFind && appConfig.findBar) {
|
||||
this.findBar = new PDFFindBar(appConfig.findBar, eventBus, l10n);
|
||||
this.findBar = new PDFFindBar(appConfig.findBar, eventBus);
|
||||
}
|
||||
if (appConfig.annotationEditorParams) {
|
||||
if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
|
||||
|
@ -7030,7 +6828,7 @@ const PDFViewerApplication = {
|
|||
});
|
||||
}
|
||||
if (appConfig.toolbar) {
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, l10n, await this._nimbusDataPromise);
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, await this._nimbusDataPromise);
|
||||
}
|
||||
if (appConfig.secondaryToolbar) {
|
||||
this.secondaryToolbar = new SecondaryToolbar(appConfig.secondaryToolbar, eventBus);
|
||||
|
@ -7043,7 +6841,7 @@ const PDFViewerApplication = {
|
|||
});
|
||||
}
|
||||
if (appConfig.passwordOverlay) {
|
||||
this.passwordPrompt = new PasswordPrompt(appConfig.passwordOverlay, this.overlayManager, l10n, this.isViewerEmbedded);
|
||||
this.passwordPrompt = new PasswordPrompt(appConfig.passwordOverlay, this.overlayManager, this.isViewerEmbedded);
|
||||
}
|
||||
if (appConfig.sidebar?.outlineView) {
|
||||
this.pdfOutlineViewer = new PDFOutlineViewer({
|
||||
|
@ -7063,8 +6861,7 @@ const PDFViewerApplication = {
|
|||
if (appConfig.sidebar?.layersView) {
|
||||
this.pdfLayerViewer = new PDFLayerViewer({
|
||||
container: appConfig.sidebar.layersView,
|
||||
eventBus,
|
||||
l10n
|
||||
eventBus
|
||||
});
|
||||
}
|
||||
if (appConfig.sidebar) {
|
||||
|
@ -7085,6 +6882,7 @@ const PDFViewerApplication = {
|
|||
}
|
||||
},
|
||||
async run(config) {
|
||||
this.preferences = this.externalServices.createPreferences();
|
||||
await this.initialize(config);
|
||||
const {
|
||||
appConfig,
|
||||
|
@ -7094,7 +6892,7 @@ const PDFViewerApplication = {
|
|||
file = window.location.href;
|
||||
if (!this.supportsDocumentFonts) {
|
||||
AppOptions.set("disableFontFace", true);
|
||||
this.l10n.get("web_fonts_disabled").then(msg => {
|
||||
this.l10n.get("pdfjs-web-fonts-disabled").then(msg => {
|
||||
console.warn(msg);
|
||||
});
|
||||
}
|
||||
|
@ -7205,7 +7003,7 @@ const PDFViewerApplication = {
|
|||
});
|
||||
},
|
||||
onError: err => {
|
||||
this.l10n.get("loading_error").then(msg => {
|
||||
this.l10n.get("pdfjs-loading-error").then(msg => {
|
||||
this._documentError(msg, err);
|
||||
});
|
||||
},
|
||||
|
@ -7330,13 +7128,13 @@ const PDFViewerApplication = {
|
|||
if (loadingTask !== this.pdfLoadingTask) {
|
||||
return undefined;
|
||||
}
|
||||
let key = "loading_error";
|
||||
let key = "pdfjs-loading-error";
|
||||
if (reason instanceof InvalidPDFException) {
|
||||
key = "invalid_file_error";
|
||||
key = "pdfjs-invalid-file-error";
|
||||
} else if (reason instanceof MissingPDFException) {
|
||||
key = "missing_file_error";
|
||||
key = "pdfjs-missing-file-error";
|
||||
} else if (reason instanceof UnexpectedResponseException) {
|
||||
key = "unexpected_response_error";
|
||||
key = "pdfjs-unexpected-response-error";
|
||||
}
|
||||
return this.l10n.get(key).then(msg => {
|
||||
this._documentError(msg, {
|
||||
|
@ -7558,7 +7356,7 @@ const PDFViewerApplication = {
|
|||
this._unblockDocumentLoadEvent();
|
||||
this._initializeAutoPrint(pdfDocument, openActionPromise);
|
||||
}, reason => {
|
||||
this.l10n.get("loading_error").then(msg => {
|
||||
this.l10n.get("pdfjs-loading-error").then(msg => {
|
||||
this._documentError(msg, {
|
||||
message: reason?.message
|
||||
});
|
||||
|
@ -7817,13 +7615,13 @@ const PDFViewerApplication = {
|
|||
return;
|
||||
}
|
||||
if (!this.supportsPrinting) {
|
||||
this.l10n.get("printing_not_supported").then(msg => {
|
||||
this.l10n.get("pdfjs-printing-not-supported").then(msg => {
|
||||
this._otherError(msg);
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.pdfViewer.pageViewsReady) {
|
||||
this.l10n.get("printing_not_ready").then(msg => {
|
||||
this.l10n.get("pdfjs-printing-not-ready").then(msg => {
|
||||
window.alert(msg);
|
||||
});
|
||||
return;
|
||||
|
@ -7832,7 +7630,7 @@ const PDFViewerApplication = {
|
|||
const printContainer = this.appConfig.printContainer;
|
||||
const printResolution = AppOptions.get("printResolution");
|
||||
const optionalContentConfigPromise = this.pdfViewer.optionalContentConfigPromise;
|
||||
const printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, printResolution, optionalContentConfigPromise, this._printAnnotationStoragePromise, this.l10n);
|
||||
const printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, printResolution, optionalContentConfigPromise, this._printAnnotationStoragePromise);
|
||||
this.printService = printService;
|
||||
this.forceRendering();
|
||||
this.setTitle();
|
||||
|
@ -8082,7 +7880,7 @@ function webViewerPageRendered({
|
|||
}
|
||||
}
|
||||
if (error) {
|
||||
PDFViewerApplication.l10n.get("rendering_error").then(msg => {
|
||||
PDFViewerApplication.l10n.get("pdfjs-rendering-error").then(msg => {
|
||||
PDFViewerApplication._otherError(msg, error);
|
||||
});
|
||||
}
|
||||
|
@ -8826,12 +8624,11 @@ class BasePreferences {
|
|||
throw new Error("Cannot initialize BasePreferences.");
|
||||
}
|
||||
this.#initializedPromise = this._readFromStorage(this.#defaults).then(prefs => {
|
||||
for (const name in this.#defaults) {
|
||||
const prefValue = prefs?.[name];
|
||||
if (typeof prefValue === typeof this.#defaults[name]) {
|
||||
this.#prefs[name] = prefValue;
|
||||
}
|
||||
for (const [name, defaultVal] of Object.entries(this.#defaults)) {
|
||||
const prefVal = prefs?.[name];
|
||||
this.#prefs[name] = typeof prefVal === typeof defaultVal ? prefVal : defaultVal;
|
||||
}
|
||||
AppOptions.setAll(this.#prefs, true);
|
||||
});
|
||||
}
|
||||
async _writeToStorage(prefObj) {
|
||||
|
@ -8854,13 +8651,75 @@ class BasePreferences {
|
|||
}
|
||||
return this.#prefs[name] ?? defaultValue;
|
||||
}
|
||||
async getAll() {
|
||||
await this.#initializedPromise;
|
||||
const obj = Object.create(null);
|
||||
for (const name in this.#defaults) {
|
||||
obj[name] = this.#prefs[name] ?? this.#defaults[name];
|
||||
get initializedPromise() {
|
||||
return this.#initializedPromise;
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./web/l10n.js
|
||||
class L10n {
|
||||
#dir;
|
||||
#lang;
|
||||
#l10n;
|
||||
constructor({
|
||||
lang,
|
||||
isRTL
|
||||
}, l10n = null) {
|
||||
this.#lang = L10n.#fixupLangCode(lang);
|
||||
this.#l10n = l10n;
|
||||
this.#dir = isRTL ?? L10n.#isRTL(this.#lang) ? "rtl" : "ltr";
|
||||
}
|
||||
setL10n(l10n) {
|
||||
this.#l10n = l10n;
|
||||
}
|
||||
getLanguage() {
|
||||
return this.#lang;
|
||||
}
|
||||
getDirection() {
|
||||
return this.#dir;
|
||||
}
|
||||
async get(ids, args = null, fallback) {
|
||||
if (Array.isArray(ids)) {
|
||||
ids = ids.map(id => ({
|
||||
id
|
||||
}));
|
||||
const messages = await this.#l10n.formatMessages(ids);
|
||||
return messages.map(message => message.value);
|
||||
}
|
||||
return obj;
|
||||
const messages = await this.#l10n.formatMessages([{
|
||||
id: ids,
|
||||
args
|
||||
}]);
|
||||
return messages?.[0].value || fallback;
|
||||
}
|
||||
async translate(element) {
|
||||
try {
|
||||
this.#l10n.connectRoot(element);
|
||||
await this.#l10n.translateRoots();
|
||||
} catch {}
|
||||
}
|
||||
static #fixupLangCode(langCode) {
|
||||
const PARTIAL_LANG_CODES = {
|
||||
en: "en-US",
|
||||
es: "es-ES",
|
||||
fy: "fy-NL",
|
||||
ga: "ga-IE",
|
||||
gu: "gu-IN",
|
||||
hi: "hi-IN",
|
||||
hy: "hy-AM",
|
||||
nb: "nb-NO",
|
||||
ne: "ne-NP",
|
||||
nn: "nn-NO",
|
||||
pa: "pa-IN",
|
||||
pt: "pt-PT",
|
||||
sv: "sv-SE",
|
||||
zh: "zh-CN"
|
||||
};
|
||||
return PARTIAL_LANG_CODES[langCode?.toLowerCase()] || langCode;
|
||||
}
|
||||
static #isRTL(lang) {
|
||||
const shortCode = lang.split("-", 1)[0];
|
||||
return ["ar", "he", "fa", "ps", "ur"].includes(shortCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8870,7 +8729,6 @@ class BasePreferences {
|
|||
|
||||
|
||||
|
||||
|
||||
;
|
||||
class FirefoxCom {
|
||||
static requestSync(action, data) {
|
||||
|
@ -8940,16 +8798,16 @@ class DownloadManager {
|
|||
isAttachment: true
|
||||
});
|
||||
}
|
||||
openOrDownloadData(element, data, filename, dest = null) {
|
||||
openOrDownloadData(data, filename, dest = null) {
|
||||
const isPdfData = isPdfFile(filename);
|
||||
const contentType = isPdfData ? "application/pdf" : "";
|
||||
if (isPdfData) {
|
||||
let blobUrl = this.#openBlobUrls.get(element);
|
||||
let blobUrl = this.#openBlobUrls.get(data);
|
||||
if (!blobUrl) {
|
||||
blobUrl = URL.createObjectURL(new Blob([data], {
|
||||
type: contentType
|
||||
}));
|
||||
this.#openBlobUrls.set(element, blobUrl);
|
||||
this.#openBlobUrls.set(data, blobUrl);
|
||||
}
|
||||
let viewerUrl = blobUrl + "?filename=" + encodeURIComponent(filename);
|
||||
if (dest) {
|
||||
|
@ -8961,7 +8819,7 @@ class DownloadManager {
|
|||
} catch (ex) {
|
||||
console.error(`openOrDownloadData: ${ex}`);
|
||||
URL.revokeObjectURL(blobUrl);
|
||||
this.#openBlobUrls.delete(element);
|
||||
this.#openBlobUrls.delete(data);
|
||||
}
|
||||
}
|
||||
this.downloadData(data, filename, contentType);
|
||||
|
@ -8982,23 +8840,6 @@ class FirefoxPreferences extends BasePreferences {
|
|||
return FirefoxCom.requestAsync("getPreferences", prefObj);
|
||||
}
|
||||
}
|
||||
class MozL10n {
|
||||
constructor(mozL10n) {
|
||||
this.mozL10n = mozL10n;
|
||||
}
|
||||
async getLanguage() {
|
||||
return this.mozL10n.getLanguage();
|
||||
}
|
||||
async getDirection() {
|
||||
return this.mozL10n.getDirection();
|
||||
}
|
||||
async get(key, args = null, fallback = getL10nFallback(key, args)) {
|
||||
return this.mozL10n.get(key, args, fallback);
|
||||
}
|
||||
async translate(element) {
|
||||
this.mozL10n.translate(element);
|
||||
}
|
||||
}
|
||||
(function listenFindEvents() {
|
||||
const events = ["find", "findagain", "findhighlightallchange", "findcasesensitivitychange", "findentirewordchange", "findbarclose", "finddiacriticmatchingchange"];
|
||||
const findLen = "find".length;
|
||||
|
@ -9205,9 +9046,9 @@ class FirefoxExternalServices extends DefaultExternalServices {
|
|||
static updateEditorStates(data) {
|
||||
FirefoxCom.request("updateEditorStates", data);
|
||||
}
|
||||
static createL10n(options) {
|
||||
const mozL10n = document.mozL10n;
|
||||
return new MozL10n(mozL10n);
|
||||
static async createL10n() {
|
||||
const [localeProperties] = await Promise.all([FirefoxCom.requestAsync("getLocaleProperties", null), document.l10n.ready]);
|
||||
return new L10n(localeProperties, document.l10n);
|
||||
}
|
||||
static createScripting(options) {
|
||||
return FirefoxScripting;
|
||||
|
@ -9242,14 +9083,6 @@ class FirefoxExternalServices extends DefaultExternalServices {
|
|||
}
|
||||
}
|
||||
PDFViewerApplication.externalServices = FirefoxExternalServices;
|
||||
document.mozL10n.setExternalLocalizerServices({
|
||||
getLocale() {
|
||||
return FirefoxCom.requestSync("getLocale", null);
|
||||
},
|
||||
getStrings(key) {
|
||||
return FirefoxCom.requestSync("getStrings", null);
|
||||
}
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ./web/print_utils.js
|
||||
|
||||
|
@ -9405,8 +9238,8 @@ PDFPrintServiceFactory.instance = {
|
|||
|
||||
|
||||
|
||||
const pdfjsVersion = '4.0.67';
|
||||
const pdfjsBuild = '5c45dfa0a';
|
||||
const pdfjsVersion = '4.0.107';
|
||||
const pdfjsBuild = '377af6892';
|
||||
const AppConstants = null;
|
||||
window.PDFViewerApplication = PDFViewerApplication;
|
||||
window.PDFViewerApplicationConstants = AppConstants;
|
||||
|
|
|
@ -2479,9 +2479,10 @@ body{
|
|||
}
|
||||
|
||||
.dropdownToolbarButton{
|
||||
--scale-select-width:140px;
|
||||
|
||||
width:var(--scale-select-width);
|
||||
display:flex;
|
||||
width:-moz-fit-content;
|
||||
width:fit-content;
|
||||
min-width:140px;
|
||||
padding:0;
|
||||
background-color:var(--dropdown-btn-bg-color);
|
||||
border:var(--dropdown-btn-border);
|
||||
|
@ -2496,12 +2497,13 @@ body{
|
|||
.dropdownToolbarButton > select{
|
||||
appearance:none;
|
||||
width:inherit;
|
||||
min-width:inherit;
|
||||
height:28px;
|
||||
font-size:12px;
|
||||
color:var(--main-color);
|
||||
margin:0;
|
||||
padding:1px 0 2px;
|
||||
padding-inline-start:6px;
|
||||
padding-block:1px 2px;
|
||||
padding-inline:6px 38px;
|
||||
border:none;
|
||||
background-color:var(--dropdown-btn-bg-color);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<script src="resource://pdf.js/build/pdf.mjs" type="module"></script>
|
||||
|
||||
<link rel="stylesheet" href="resource://pdf.js/web/viewer.css">
|
||||
<link rel="localization" href="toolkit/pdfviewer/viewer.ftl"/>
|
||||
|
||||
<script src="resource://pdf.js/web/viewer.mjs" type="module"></script>
|
||||
</head>
|
||||
|
@ -41,17 +42,17 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="toolbarSidebar">
|
||||
<div id="toolbarSidebarLeft">
|
||||
<div id="sidebarViewButtons" class="splitToolbarButton toggled" role="radiogroup">
|
||||
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs" role="radio" aria-checked="true" aria-controls="thumbnailView">
|
||||
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
||||
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="pdfjs-thumbs-button" role="radio" aria-checked="true" aria-controls="thumbnailView">
|
||||
<span data-l10n-id="pdfjs-thumbs-button-label">Thumbnails</span>
|
||||
</button>
|
||||
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline" role="radio" aria-checked="false" aria-controls="outlineView">
|
||||
<span data-l10n-id="document_outline_label">Document Outline</span>
|
||||
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="pdfjs-document-outline-button" role="radio" aria-checked="false" aria-controls="outlineView">
|
||||
<span data-l10n-id="pdfjs-document-outline-button-label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments" role="radio" aria-checked="false" aria-controls="attachmentsView">
|
||||
<span data-l10n-id="attachments_label">Attachments</span>
|
||||
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="pdfjs-attachments-button" role="radio" aria-checked="false" aria-controls="attachmentsView">
|
||||
<span data-l10n-id="pdfjs-attachments-button-label">Attachments</span>
|
||||
</button>
|
||||
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="layers" role="radio" aria-checked="false" aria-controls="layersView">
|
||||
<span data-l10n-id="layers_label">Layers</span>
|
||||
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="pdfjs-layers-button" role="radio" aria-checked="false" aria-controls="layersView">
|
||||
<span data-l10n-id="pdfjs-layers-button-label">Layers</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,8 +61,8 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="outlineOptionsContainer" class="hidden">
|
||||
<div class="verticalToolbarSeparator"></div>
|
||||
|
||||
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="current_outline_item">
|
||||
<span data-l10n-id="current_outline_item_label">Current Outline Item</span>
|
||||
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="pdfjs-current-outline-item-button">
|
||||
<span data-l10n-id="pdfjs-current-outline-item-button-label">Current Outline Item</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -82,29 +83,29 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="mainContainer">
|
||||
<div class="findbar hidden doorHanger" id="findbar">
|
||||
<div id="findbarInputContainer">
|
||||
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input" aria-invalid="false">
|
||||
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="pdfjs-find-input" aria-invalid="false">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="findPrevious" class="toolbarButton" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
|
||||
<span data-l10n-id="find_previous_label">Previous</span>
|
||||
<button id="findPrevious" class="toolbarButton" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="pdfjs-find-previous-button">
|
||||
<span data-l10n-id="pdfjs-find-previous-button-label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="findNext" class="toolbarButton" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
|
||||
<span data-l10n-id="find_next_label">Next</span>
|
||||
<button id="findNext" class="toolbarButton" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="pdfjs-find-next-button">
|
||||
<span data-l10n-id="pdfjs-find-next-button-label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="findbarOptionsOneContainer">
|
||||
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight All</label>
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="pdfjs-find-highlight-checkbox">Highlight All</label>
|
||||
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match Case</label>
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="pdfjs-find-match-case-checkbox-label">Match Case</label>
|
||||
</div>
|
||||
<div id="findbarOptionsTwoContainer">
|
||||
<input type="checkbox" id="findMatchDiacritics" class="toolbarField" tabindex="96">
|
||||
<label for="findMatchDiacritics" class="toolbarLabel" data-l10n-id="find_match_diacritics_label">Match Diacritics</label>
|
||||
<label for="findMatchDiacritics" class="toolbarLabel" data-l10n-id="pdfjs-find-match-diacritics-checkbox-label">Match Diacritics</label>
|
||||
<input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="97">
|
||||
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole Words</label>
|
||||
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="pdfjs-find-entire-word-checkbox-label">Whole Words</label>
|
||||
</div>
|
||||
|
||||
<div id="findbarMessageContainer" aria-live="polite">
|
||||
|
@ -116,11 +117,11 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div class="editorParamsToolbar hidden doorHangerRight" id="editorFreeTextParamsToolbar">
|
||||
<div class="editorParamsToolbarContainer">
|
||||
<div class="editorParamsSetter">
|
||||
<label for="editorFreeTextColor" class="editorParamsLabel" data-l10n-id="editor_free_text_color">Color</label>
|
||||
<label for="editorFreeTextColor" class="editorParamsLabel" data-l10n-id="pdfjs-editor-free-text-color-input">Color</label>
|
||||
<input type="color" id="editorFreeTextColor" class="editorParamsColor" tabindex="100">
|
||||
</div>
|
||||
<div class="editorParamsSetter">
|
||||
<label for="editorFreeTextFontSize" class="editorParamsLabel" data-l10n-id="editor_free_text_size">Size</label>
|
||||
<label for="editorFreeTextFontSize" class="editorParamsLabel" data-l10n-id="pdfjs-editor-free-text-size-input">Size</label>
|
||||
<input type="range" id="editorFreeTextFontSize" class="editorParamsSlider" value="10" min="5" max="100" step="1" tabindex="101">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,15 +130,15 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div class="editorParamsToolbar hidden doorHangerRight" id="editorInkParamsToolbar">
|
||||
<div class="editorParamsToolbarContainer">
|
||||
<div class="editorParamsSetter">
|
||||
<label for="editorInkColor" class="editorParamsLabel" data-l10n-id="editor_ink_color">Color</label>
|
||||
<label for="editorInkColor" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-color-input">Color</label>
|
||||
<input type="color" id="editorInkColor" class="editorParamsColor" tabindex="102">
|
||||
</div>
|
||||
<div class="editorParamsSetter">
|
||||
<label for="editorInkThickness" class="editorParamsLabel" data-l10n-id="editor_ink_thickness">Thickness</label>
|
||||
<label for="editorInkThickness" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-thickness-input">Thickness</label>
|
||||
<input type="range" id="editorInkThickness" class="editorParamsSlider" value="1" min="1" max="20" step="1" tabindex="103">
|
||||
</div>
|
||||
<div class="editorParamsSetter">
|
||||
<label for="editorInkOpacity" class="editorParamsLabel" data-l10n-id="editor_ink_opacity">Opacity</label>
|
||||
<label for="editorInkOpacity" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-opacity-input">Opacity</label>
|
||||
<input type="range" id="editorInkOpacity" class="editorParamsSlider" value="100" min="1" max="100" step="1" tabindex="104">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -145,8 +146,8 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
|
||||
<div class="editorParamsToolbar hidden doorHangerRight" id="editorStampParamsToolbar">
|
||||
<div class="editorParamsToolbarContainer">
|
||||
<button id="editorStampAddImage" class="secondaryToolbarButton" title="Add image" tabindex="105" data-l10n-id="editor_stamp_add_image">
|
||||
<span data-l10n-id="editor_stamp_add_image_label">Add image</span>
|
||||
<button id="editorStampAddImage" class="secondaryToolbarButton" title="Add image" tabindex="105" data-l10n-id="pdfjs-editor-stamp-add-image-button">
|
||||
<span data-l10n-id="pdfjs-editor-stamp-add-image-button-label">Add image</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -154,88 +155,88 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
||||
<div id="secondaryToolbarButtonContainer">
|
||||
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton visibleMediumView" title="Print" tabindex="52" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton visibleMediumView" title="Print" tabindex="52" data-l10n-id="pdfjs-print-button">
|
||||
<span data-l10n-id="pdfjs-print-button-label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton visibleMediumView" title="Save" tabindex="53" data-l10n-id="save">
|
||||
<span data-l10n-id="save_label">Save</span>
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton visibleMediumView" title="Save" tabindex="53" data-l10n-id="pdfjs-save-button">
|
||||
<span data-l10n-id="pdfjs-save-button-label">Save</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleMediumView"></div>
|
||||
|
||||
<button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
<button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="pdfjs-presentation-mode-button">
|
||||
<span data-l10n-id="pdfjs-presentation-mode-button-label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<a href="#" id="viewBookmark" class="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabindex="55" data-l10n-id="bookmark1">
|
||||
<span data-l10n-id="bookmark1_label">Current Page</span>
|
||||
<a href="#" id="viewBookmark" class="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabindex="55" data-l10n-id="pdfjs-bookmark-button">
|
||||
<span data-l10n-id="pdfjs-bookmark-button-label">Current Page</span>
|
||||
</a>
|
||||
|
||||
<div id="viewBookmarkSeparator" class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="firstPage" class="secondaryToolbarButton" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
|
||||
<span data-l10n-id="first_page_label">Go to First Page</span>
|
||||
<button id="firstPage" class="secondaryToolbarButton" title="Go to First Page" tabindex="56" data-l10n-id="pdfjs-first-page-button">
|
||||
<span data-l10n-id="pdfjs-first-page-button-label">Go to First Page</span>
|
||||
</button>
|
||||
<button id="lastPage" class="secondaryToolbarButton" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
|
||||
<span data-l10n-id="last_page_label">Go to Last Page</span>
|
||||
<button id="lastPage" class="secondaryToolbarButton" title="Go to Last Page" tabindex="57" data-l10n-id="pdfjs-last-page-button">
|
||||
<span data-l10n-id="pdfjs-last-page-button-label">Go to Last Page</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
|
||||
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton" title="Rotate Clockwise" tabindex="58" data-l10n-id="pdfjs-page-rotate-cw-button">
|
||||
<span data-l10n-id="pdfjs-page-rotate-cw-button-label">Rotate Clockwise</span>
|
||||
</button>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
|
||||
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="pdfjs-page-rotate-ccw-button">
|
||||
<span data-l10n-id="pdfjs-page-rotate-ccw-button-label">Rotate Counterclockwise</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<div id="cursorToolButtons" role="radiogroup">
|
||||
<button id="cursorSelectTool" class="secondaryToolbarButton toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
|
||||
<button id="cursorSelectTool" class="secondaryToolbarButton toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="pdfjs-cursor-text-select-tool-button" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="pdfjs-cursor-text-select-tool-button-label">Text Selection Tool</span>
|
||||
</button>
|
||||
<button id="cursorHandTool" class="secondaryToolbarButton" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
|
||||
<button id="cursorHandTool" class="secondaryToolbarButton" title="Enable Hand Tool" tabindex="61" data-l10n-id="pdfjs-cursor-hand-tool-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-cursor-hand-tool-button-label">Hand Tool</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<div id="scrollModeButtons" role="radiogroup">
|
||||
<button id="scrollPage" class="secondaryToolbarButton" title="Use Page Scrolling" tabindex="62" data-l10n-id="scroll_page" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="scroll_page_label">Page Scrolling</span>
|
||||
<button id="scrollPage" class="secondaryToolbarButton" title="Use Page Scrolling" tabindex="62" data-l10n-id="pdfjs-scroll-page-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-scroll-page-button-label">Page Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollVertical" class="secondaryToolbarButton toggled" title="Use Vertical Scrolling" tabindex="63" data-l10n-id="scroll_vertical" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="scroll_vertical_label" >Vertical Scrolling</span>
|
||||
<button id="scrollVertical" class="secondaryToolbarButton toggled" title="Use Vertical Scrolling" tabindex="63" data-l10n-id="pdfjs-scroll-vertical-button" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="pdfjs-scroll-vertical-button-label" >Vertical Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollHorizontal" class="secondaryToolbarButton" title="Use Horizontal Scrolling" tabindex="64" data-l10n-id="scroll_horizontal" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
|
||||
<button id="scrollHorizontal" class="secondaryToolbarButton" title="Use Horizontal Scrolling" tabindex="64" data-l10n-id="pdfjs-scroll-horizontal-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-scroll-horizontal-button-label">Horizontal Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollWrapped" class="secondaryToolbarButton" title="Use Wrapped Scrolling" tabindex="65" data-l10n-id="scroll_wrapped" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
|
||||
<button id="scrollWrapped" class="secondaryToolbarButton" title="Use Wrapped Scrolling" tabindex="65" data-l10n-id="pdfjs-scroll-wrapped-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-scroll-wrapped-button-label">Wrapped Scrolling</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<div id="spreadModeButtons" role="radiogroup">
|
||||
<button id="spreadNone" class="secondaryToolbarButton toggled" title="Do not join page spreads" tabindex="66" data-l10n-id="spread_none" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="spread_none_label">No Spreads</span>
|
||||
<button id="spreadNone" class="secondaryToolbarButton toggled" title="Do not join page spreads" tabindex="66" data-l10n-id="pdfjs-spread-none-button" role="radio" aria-checked="true">
|
||||
<span data-l10n-id="pdfjs-spread-none-button-label">No Spreads</span>
|
||||
</button>
|
||||
<button id="spreadOdd" class="secondaryToolbarButton" title="Join page spreads starting with odd-numbered pages" tabindex="67" data-l10n-id="spread_odd" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
|
||||
<button id="spreadOdd" class="secondaryToolbarButton" title="Join page spreads starting with odd-numbered pages" tabindex="67" data-l10n-id="pdfjs-spread-odd-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-spread-odd-button-label">Odd Spreads</span>
|
||||
</button>
|
||||
<button id="spreadEven" class="secondaryToolbarButton" title="Join page spreads starting with even-numbered pages" tabindex="68" data-l10n-id="spread_even" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="spread_even_label">Even Spreads</span>
|
||||
<button id="spreadEven" class="secondaryToolbarButton" title="Join page spreads starting with even-numbered pages" tabindex="68" data-l10n-id="pdfjs-spread-even-button" role="radio" aria-checked="false">
|
||||
<span data-l10n-id="pdfjs-spread-even-button-label">Even Spreads</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="documentProperties" class="secondaryToolbarButton" title="Document Properties…" tabindex="69" data-l10n-id="document_properties" aria-controls="documentPropertiesDialog">
|
||||
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
||||
<button id="documentProperties" class="secondaryToolbarButton" title="Document Properties…" tabindex="69" data-l10n-id="pdfjs-document-properties-button" aria-controls="documentPropertiesDialog">
|
||||
<span data-l10n-id="pdfjs-document-properties-button-label">Document Properties…</span>
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- secondaryToolbar -->
|
||||
|
@ -244,80 +245,80 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="toolbarContainer">
|
||||
<div id="toolbarViewer">
|
||||
<div id="toolbarViewerLeft">
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar" aria-expanded="false" aria-controls="sidebarContainer">
|
||||
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="pdfjs-toggle-sidebar-button" aria-expanded="false" aria-controls="sidebarContainer">
|
||||
<span data-l10n-id="pdfjs-toggle-sidebar-button-label">Toggle Sidebar</span>
|
||||
</button>
|
||||
<div class="toolbarButtonSpacer"></div>
|
||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
|
||||
<span data-l10n-id="findbar_label">Find</span>
|
||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="pdfjs-findbar-button" aria-expanded="false" aria-controls="findbar">
|
||||
<span data-l10n-id="pdfjs-findbar-button-label">Find</span>
|
||||
</button>
|
||||
<div class="splitToolbarButton hiddenSmallView">
|
||||
<button class="toolbarButton" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
||||
<span data-l10n-id="previous_label">Previous</span>
|
||||
<button class="toolbarButton" title="Previous Page" id="previous" tabindex="13" data-l10n-id="pdfjs-previous-button">
|
||||
<span data-l10n-id="pdfjs-previous-button-label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
|
||||
<span data-l10n-id="next_label">Next</span>
|
||||
<button class="toolbarButton" title="Next Page" id="next" tabindex="14" data-l10n-id="pdfjs-next-button">
|
||||
<span data-l10n-id="pdfjs-next-button-label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="number" id="pageNumber" class="toolbarField" title="Page" value="1" min="1" tabindex="15" data-l10n-id="page" autocomplete="off">
|
||||
<input type="number" id="pageNumber" class="toolbarField" title="Page" value="1" min="1" tabindex="15" data-l10n-id="pdfjs-page-input" autocomplete="off">
|
||||
<span id="numPages" class="toolbarLabel"></span>
|
||||
</div>
|
||||
<div id="toolbarViewerRight">
|
||||
|
||||
<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="pdfjs-print-button">
|
||||
<span data-l10n-id="pdfjs-print-button-label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="download" class="toolbarButton hiddenMediumView" title="Save" tabindex="33" data-l10n-id="save">
|
||||
<span data-l10n-id="save_label">Save</span>
|
||||
<button id="download" class="toolbarButton hiddenMediumView" title="Save" tabindex="33" data-l10n-id="pdfjs-save-button">
|
||||
<span data-l10n-id="pdfjs-save-button-label">Save</span>
|
||||
</button>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenMediumView"></div>
|
||||
|
||||
<div id="editorModeButtons" class="splitToolbarButton toggled" role="radiogroup">
|
||||
<button id="editorFreeText" class="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabindex="34" data-l10n-id="editor_free_text2">
|
||||
<span data-l10n-id="editor_free_text2_label">Text</span>
|
||||
<button id="editorFreeText" class="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabindex="34" data-l10n-id="pdfjs-editor-free-text-button">
|
||||
<span data-l10n-id="pdfjs-editor-free-text-button-label">Text</span>
|
||||
</button>
|
||||
<button id="editorInk" class="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabindex="35" data-l10n-id="editor_ink2">
|
||||
<span data-l10n-id="editor_ink2_label">Draw</span>
|
||||
<button id="editorInk" class="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabindex="35" data-l10n-id="pdfjs-editor-ink-button">
|
||||
<span data-l10n-id="pdfjs-editor-ink-button-label">Draw</span>
|
||||
</button>
|
||||
<button id="editorStamp" class="toolbarButton hidden" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="editor_stamp1">
|
||||
<span data-l10n-id="editor_stamp1_label">Add or edit images</span>
|
||||
<button id="editorStamp" class="toolbarButton hidden" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="pdfjs-editor-stamp-button">
|
||||
<span data-l10n-id="pdfjs-editor-stamp-button-label">Add or edit images</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="editorModeSeparator" class="verticalToolbarSeparator"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="48" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="48" data-l10n-id="pdfjs-tools-button" aria-expanded="false" aria-controls="secondaryToolbar">
|
||||
<span data-l10n-id="pdfjs-tools-button-label">Tools</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="toolbarViewerMiddle">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="zoomOut" class="toolbarButton" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
||||
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
||||
<button id="zoomOut" class="toolbarButton" title="Zoom Out" tabindex="21" data-l10n-id="pdfjs-zoom-out-button">
|
||||
<span data-l10n-id="pdfjs-zoom-out-button-label">Zoom Out</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="zoomIn" class="toolbarButton" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
||||
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
||||
<button id="zoomIn" class="toolbarButton" title="Zoom In" tabindex="22" data-l10n-id="pdfjs-zoom-in-button">
|
||||
<span data-l10n-id="pdfjs-zoom-in-button-label">Zoom In</span>
|
||||
</button>
|
||||
</div>
|
||||
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
|
||||
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
|
||||
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="pdfjs-zoom-select">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="pdfjs-page-scale-auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="pdfjs-page-scale-actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="pdfjs-page-scale-fit">Page Fit</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="pdfjs-page-scale-width">Page Width</option>
|
||||
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 0 }'>0%</option>
|
||||
<option title="" value="0.5" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -339,85 +340,85 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div id="dialogContainer">
|
||||
<dialog id="passwordDialog">
|
||||
<div class="row">
|
||||
<label for="password" id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</label>
|
||||
<label for="password" id="passwordText" data-l10n-id="pdfjs-password-label">Enter the password to open this PDF file:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="password" id="password" class="toolbarField">
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="pdfjs-password-cancel-button">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="pdfjs-password-ok-button">OK</span></button>
|
||||
</div>
|
||||
</dialog>
|
||||
<dialog id="documentPropertiesDialog">
|
||||
<div class="row">
|
||||
<span id="fileNameLabel" data-l10n-id="document_properties_file_name">File name:</span>
|
||||
<span id="fileNameLabel" data-l10n-id="pdfjs-document-properties-file-name">File name:</span>
|
||||
<p id="fileNameField" aria-labelledby="fileNameLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="fileSizeLabel" data-l10n-id="document_properties_file_size">File size:</span>
|
||||
<span id="fileSizeLabel" data-l10n-id="pdfjs-document-properties-file-size">File size:</span>
|
||||
<p id="fileSizeField" aria-labelledby="fileSizeLabel">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span id="titleLabel" data-l10n-id="document_properties_title">Title:</span>
|
||||
<span id="titleLabel" data-l10n-id="pdfjs-document-properties-title">Title:</span>
|
||||
<p id="titleField" aria-labelledby="titleLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="authorLabel" data-l10n-id="document_properties_author">Author:</span>
|
||||
<span id="authorLabel" data-l10n-id="pdfjs-document-properties-author">Author:</span>
|
||||
<p id="authorField" aria-labelledby="authorLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="subjectLabel" data-l10n-id="document_properties_subject">Subject:</span>
|
||||
<span id="subjectLabel" data-l10n-id="pdfjs-document-properties-subject">Subject:</span>
|
||||
<p id="subjectField" aria-labelledby="subjectLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="keywordsLabel" data-l10n-id="document_properties_keywords">Keywords:</span>
|
||||
<span id="keywordsLabel" data-l10n-id="pdfjs-document-properties-keywords">Keywords:</span>
|
||||
<p id="keywordsField" aria-labelledby="keywordsLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="creationDateLabel" data-l10n-id="document_properties_creation_date">Creation Date:</span>
|
||||
<span id="creationDateLabel" data-l10n-id="pdfjs-document-properties-creation-date">Creation Date:</span>
|
||||
<p id="creationDateField" aria-labelledby="creationDateLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="modificationDateLabel" data-l10n-id="document_properties_modification_date">Modification Date:</span>
|
||||
<span id="modificationDateLabel" data-l10n-id="pdfjs-document-properties-modification-date">Modification Date:</span>
|
||||
<p id="modificationDateField" aria-labelledby="modificationDateLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="creatorLabel" data-l10n-id="document_properties_creator">Creator:</span>
|
||||
<span id="creatorLabel" data-l10n-id="pdfjs-document-properties-creator">Creator:</span>
|
||||
<p id="creatorField" aria-labelledby="creatorLabel">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span id="producerLabel" data-l10n-id="document_properties_producer">PDF Producer:</span>
|
||||
<span id="producerLabel" data-l10n-id="pdfjs-document-properties-producer">PDF Producer:</span>
|
||||
<p id="producerField" aria-labelledby="producerLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="versionLabel" data-l10n-id="document_properties_version">PDF Version:</span>
|
||||
<span id="versionLabel" data-l10n-id="pdfjs-document-properties-version">PDF Version:</span>
|
||||
<p id="versionField" aria-labelledby="versionLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="pageCountLabel" data-l10n-id="document_properties_page_count">Page Count:</span>
|
||||
<span id="pageCountLabel" data-l10n-id="pdfjs-document-properties-page-count">Page Count:</span>
|
||||
<p id="pageCountField" aria-labelledby="pageCountLabel">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span id="pageSizeLabel" data-l10n-id="document_properties_page_size">Page Size:</span>
|
||||
<span id="pageSizeLabel" data-l10n-id="pdfjs-document-properties-page-size">Page Size:</span>
|
||||
<p id="pageSizeField" aria-labelledby="pageSizeLabel">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span id="linearizedLabel" data-l10n-id="document_properties_linearized">Fast Web View:</span>
|
||||
<span id="linearizedLabel" data-l10n-id="pdfjs-document-properties-linearized">Fast Web View:</span>
|
||||
<p id="linearizedField" aria-labelledby="linearizedLabel">-</p>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="document_properties_close">Close</span></button>
|
||||
<button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="pdfjs-document-properties-close-button">Close</span></button>
|
||||
</div>
|
||||
</dialog>
|
||||
<dialog id="altTextDialog" aria-labelledby="dialogLabel" aria-describedby="dialogDescription">
|
||||
<div id="altTextContainer">
|
||||
<div id="overallDescription">
|
||||
<span id="dialogLabel" data-l10n-id="editor_alt_text_dialog_label" class="title">Choose an option</span>
|
||||
<span id="dialogDescription" data-l10n-id="editor_alt_text_dialog_description">
|
||||
<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">
|
||||
Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.
|
||||
</span>
|
||||
</div>
|
||||
|
@ -425,34 +426,34 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<div class="radio">
|
||||
<div class="radioButton">
|
||||
<input type="radio" id="descriptionButton" name="altTextOption" tabindex="0" aria-describedby="descriptionAreaLabel" checked>
|
||||
<label for="descriptionButton" data-l10n-id="editor_alt_text_add_description_label">Add a description</label>
|
||||
<label for="descriptionButton" data-l10n-id="pdfjs-editor-alt-text-add-description-label">Add a description</label>
|
||||
</div>
|
||||
<div class="radioLabel">
|
||||
<span id="descriptionAreaLabel" data-l10n-id="editor_alt_text_add_description_description">
|
||||
<span id="descriptionAreaLabel" data-l10n-id="pdfjs-editor-alt-text-add-description-description">
|
||||
Aim for 1-2 sentences that describe the subject, setting, or actions.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="descriptionArea">
|
||||
<textarea id="descriptionTextarea" placeholder="For example, “A young man sits down at a table to eat a meal”" aria-labelledby="descriptionAreaLabel" data-l10n-id="editor_alt_text_textarea" tabindex="0"></textarea>
|
||||
<textarea id="descriptionTextarea" placeholder="For example, “A young man sits down at a table to eat a meal”" aria-labelledby="descriptionAreaLabel" data-l10n-id="pdfjs-editor-alt-text-textarea" tabindex="0"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="markAsDecorative">
|
||||
<div class="radio">
|
||||
<div class="radioButton">
|
||||
<input type="radio" id="decorativeButton" name="altTextOption" aria-describedby="decorativeLabel">
|
||||
<label for="decorativeButton" data-l10n-id="editor_alt_text_mark_decorative_label">Mark as decorative</label>
|
||||
<label for="decorativeButton" data-l10n-id="pdfjs-editor-alt-text-mark-decorative-label">Mark as decorative</label>
|
||||
</div>
|
||||
<div class="radioLabel">
|
||||
<span id="decorativeLabel" data-l10n-id="editor_alt_text_mark_decorative_description">
|
||||
<span id="decorativeLabel" data-l10n-id="pdfjs-editor-alt-text-mark-decorative-description">
|
||||
This is used for ornamental images, like borders or watermarks.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<button id="altTextCancel" tabindex="0"><span data-l10n-id="editor_alt_text_cancel_button">Cancel</span></button>
|
||||
<button id="altTextSave" tabindex="0"><span data-l10n-id="editor_alt_text_save_button">Save</span></button>
|
||||
<button id="altTextCancel" 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>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -20,8 +20,8 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: 5c45dfa0ae97d03d171229b2609c97f6b10cdba7 (2023-10-14T12:36:25Z).
|
||||
revision: 5c45dfa0ae97d03d171229b2609c97f6b10cdba7
|
||||
release: 377af6892b6c9e22a5fc545dfd454ad73f411990 (2023-10-23T12:36:30Z).
|
||||
revision: 377af6892b6c9e22a5fc545dfd454ad73f411990
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
Загрузка…
Ссылка в новой задаче