mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-27 17:37:22 +02:00
Compare commits
12 Commits
da17c7b82f
...
50c573d16d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50c573d16d | ||
|
|
56a683bc3b | ||
|
|
4a48a7ec0f | ||
|
|
21829f4157 | ||
|
|
4e76a78341 | ||
|
|
a4fea2dafd | ||
|
|
bbf9bfc3c2 | ||
|
|
bdfa96878d | ||
|
|
59cb9a064e | ||
|
|
71ad9fd0b7 | ||
|
|
cec32c6177 | ||
|
|
132ccf04db |
@ -1177,9 +1177,7 @@ class Catalog {
|
|||||||
this.pageDictCache.clear();
|
this.pageDictCache.clear();
|
||||||
this.nonBlendModesSet.clear();
|
this.nonBlendModesSet.clear();
|
||||||
|
|
||||||
const translatedFonts = await Promise.all(this.fontCache);
|
for (const { dict } of await Promise.all(this.fontCache)) {
|
||||||
|
|
||||||
for (const { dict } of translatedFonts) {
|
|
||||||
delete dict.cacheKey;
|
delete dict.cacheKey;
|
||||||
}
|
}
|
||||||
this.fontCache.clear();
|
this.fontCache.clear();
|
||||||
|
|||||||
@ -1046,27 +1046,19 @@ class PartialEvaluator {
|
|||||||
) {
|
) {
|
||||||
const fontName = fontArgs?.[0] instanceof Name ? fontArgs[0].name : null;
|
const fontName = fontArgs?.[0] instanceof Name ? fontArgs[0].name : null;
|
||||||
|
|
||||||
let translated = await this.loadFont(
|
const translated = await this.loadFont(
|
||||||
fontName,
|
fontName,
|
||||||
fontRef,
|
fontRef,
|
||||||
resources,
|
resources,
|
||||||
|
task,
|
||||||
fallbackFontDict,
|
fallbackFontDict,
|
||||||
cssFontInfo
|
cssFontInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
if (translated.font.isType3Font) {
|
if (translated.font.isType3Font) {
|
||||||
try {
|
// Add the dependencies to the parent operatorList so they are
|
||||||
await translated.loadType3Data(this, resources, task);
|
// resolved before Type3 operatorLists are executed synchronously.
|
||||||
// Add the dependencies to the parent operatorList so they are
|
operatorList.addDependencies(translated.type3Dependencies);
|
||||||
// resolved before Type3 operatorLists are executed synchronously.
|
|
||||||
operatorList.addDependencies(translated.type3Dependencies);
|
|
||||||
} catch (reason) {
|
|
||||||
translated = new TranslatedFont({
|
|
||||||
loadedName: "g_font_error",
|
|
||||||
font: new ErrorFont(`Type3 font load error: ${reason}`),
|
|
||||||
dict: translated.font,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
state.font = translated.font;
|
state.font = translated.font;
|
||||||
@ -1228,6 +1220,7 @@ class PartialEvaluator {
|
|||||||
fontName,
|
fontName,
|
||||||
font,
|
font,
|
||||||
resources,
|
resources,
|
||||||
|
task,
|
||||||
fallbackFontDict = null,
|
fallbackFontDict = null,
|
||||||
cssFontInfo = null
|
cssFontInfo = null
|
||||||
) {
|
) {
|
||||||
@ -1356,14 +1349,21 @@ class PartialEvaluator {
|
|||||||
font.loadedName = `${this.idFactory.getDocId()}_${fontID}`;
|
font.loadedName = `${this.idFactory.getDocId()}_${fontID}`;
|
||||||
|
|
||||||
this.translateFont(preEvaluatedFont)
|
this.translateFont(preEvaluatedFont)
|
||||||
.then(translatedFont => {
|
.then(async translatedFont => {
|
||||||
resolve(
|
const translated = new TranslatedFont({
|
||||||
new TranslatedFont({
|
loadedName: font.loadedName,
|
||||||
loadedName: font.loadedName,
|
font: translatedFont,
|
||||||
font: translatedFont,
|
dict: font,
|
||||||
dict: font,
|
});
|
||||||
})
|
|
||||||
);
|
if (translatedFont.isType3Font) {
|
||||||
|
try {
|
||||||
|
await translated.loadType3Data(this, resources, task);
|
||||||
|
} catch (reason) {
|
||||||
|
throw new Error(`Type3 font load error: ${reason}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resolve(translated);
|
||||||
})
|
})
|
||||||
.catch(reason => {
|
.catch(reason => {
|
||||||
// TODO reject?
|
// TODO reject?
|
||||||
@ -1372,9 +1372,7 @@ class PartialEvaluator {
|
|||||||
resolve(
|
resolve(
|
||||||
new TranslatedFont({
|
new TranslatedFont({
|
||||||
loadedName: font.loadedName,
|
loadedName: font.loadedName,
|
||||||
font: new ErrorFont(
|
font: new ErrorFont(reason?.message),
|
||||||
reason instanceof Error ? reason.message : reason
|
|
||||||
),
|
|
||||||
dict: font,
|
dict: font,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -2616,16 +2614,12 @@ class PartialEvaluator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleSetFont(fontName, fontRef) {
|
async function handleSetFont(fontName, fontRef) {
|
||||||
const translated = await self.loadFont(fontName, fontRef, resources);
|
const translated = await self.loadFont(
|
||||||
|
fontName,
|
||||||
if (translated.font.isType3Font) {
|
fontRef,
|
||||||
try {
|
resources,
|
||||||
await translated.loadType3Data(self, resources, task);
|
task
|
||||||
} catch {
|
);
|
||||||
// Ignore Type3-parsing errors, since we only use `loadType3Data`
|
|
||||||
// here to ensure that we'll always obtain a useful /FontBBox.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
textState.loadedName = translated.loadedName;
|
textState.loadedName = translated.loadedName;
|
||||||
textState.font = translated.font;
|
textState.font = translated.font;
|
||||||
@ -4602,20 +4596,22 @@ class PartialEvaluator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TranslatedFont {
|
class TranslatedFont {
|
||||||
|
#sent = false;
|
||||||
|
|
||||||
|
#type3Loaded = null;
|
||||||
|
|
||||||
constructor({ loadedName, font, dict }) {
|
constructor({ loadedName, font, dict }) {
|
||||||
this.loadedName = loadedName;
|
this.loadedName = loadedName;
|
||||||
this.font = font;
|
this.font = font;
|
||||||
this.dict = dict;
|
this.dict = dict;
|
||||||
this.type3Loaded = null;
|
|
||||||
this.type3Dependencies = font.isType3Font ? new Set() : null;
|
this.type3Dependencies = font.isType3Font ? new Set() : null;
|
||||||
this.sent = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
send(handler) {
|
send(handler) {
|
||||||
if (this.sent) {
|
if (this.#sent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.sent = true;
|
this.#sent = true;
|
||||||
|
|
||||||
handler.send("commonobj", [
|
handler.send("commonobj", [
|
||||||
this.loadedName,
|
this.loadedName,
|
||||||
@ -4645,12 +4641,12 @@ class TranslatedFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadType3Data(evaluator, resources, task) {
|
loadType3Data(evaluator, resources, task) {
|
||||||
if (this.type3Loaded) {
|
if (this.#type3Loaded) {
|
||||||
return this.type3Loaded;
|
return this.#type3Loaded;
|
||||||
}
|
|
||||||
if (!this.font.isType3Font) {
|
|
||||||
throw new Error("Must be a Type3 font.");
|
|
||||||
}
|
}
|
||||||
|
const { font, type3Dependencies } = this;
|
||||||
|
assert(font.isType3Font, "Must be a Type3 font.");
|
||||||
|
|
||||||
// When parsing Type3 glyphs, always ignore them if there are errors.
|
// When parsing Type3 glyphs, always ignore them if there are errors.
|
||||||
// Compared to the parsing of e.g. an entire page, it doesn't really
|
// Compared to the parsing of e.g. an entire page, it doesn't really
|
||||||
// make sense to only be able to render a Type3 glyph partially.
|
// make sense to only be able to render a Type3 glyph partially.
|
||||||
@ -4662,14 +4658,12 @@ class TranslatedFont {
|
|||||||
}
|
}
|
||||||
type3Evaluator.type3FontRefs = type3FontRefs;
|
type3Evaluator.type3FontRefs = type3FontRefs;
|
||||||
|
|
||||||
const translatedFont = this.font,
|
|
||||||
type3Dependencies = this.type3Dependencies;
|
|
||||||
let loadCharProcsPromise = Promise.resolve();
|
let loadCharProcsPromise = Promise.resolve();
|
||||||
const charProcs = this.dict.get("CharProcs");
|
const charProcs = this.dict.get("CharProcs");
|
||||||
const fontResources = this.dict.get("Resources") || resources;
|
const fontResources = this.dict.get("Resources") || resources;
|
||||||
const charProcOperatorList = Object.create(null);
|
const charProcOperatorList = Object.create(null);
|
||||||
|
|
||||||
const fontBBox = Util.normalizeRect(translatedFont.bbox || [0, 0, 0, 0]),
|
const fontBBox = Util.normalizeRect(font.bbox || [0, 0, 0, 0]),
|
||||||
width = fontBBox[2] - fontBBox[0],
|
width = fontBBox[2] - fontBBox[0],
|
||||||
height = fontBBox[3] - fontBBox[1];
|
height = fontBBox[3] - fontBBox[1];
|
||||||
const fontBBoxSize = Math.hypot(width, height);
|
const fontBBoxSize = Math.hypot(width, height);
|
||||||
@ -4693,7 +4687,7 @@ class TranslatedFont {
|
|||||||
// colour-related parameters) in the graphics state;
|
// colour-related parameters) in the graphics state;
|
||||||
// any use of such operators shall be ignored."
|
// any use of such operators shall be ignored."
|
||||||
if (operatorList.fnArray[0] === OPS.setCharWidthAndBounds) {
|
if (operatorList.fnArray[0] === OPS.setCharWidthAndBounds) {
|
||||||
this._removeType3ColorOperators(operatorList, fontBBoxSize);
|
this.#removeType3ColorOperators(operatorList, fontBBoxSize);
|
||||||
}
|
}
|
||||||
charProcOperatorList[key] = operatorList.getIR();
|
charProcOperatorList[key] = operatorList.getIR();
|
||||||
|
|
||||||
@ -4708,20 +4702,17 @@ class TranslatedFont {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.type3Loaded = loadCharProcsPromise.then(() => {
|
this.#type3Loaded = loadCharProcsPromise.then(() => {
|
||||||
translatedFont.charProcOperatorList = charProcOperatorList;
|
font.charProcOperatorList = charProcOperatorList;
|
||||||
if (this._bbox) {
|
if (this._bbox) {
|
||||||
translatedFont.isCharBBox = true;
|
font.isCharBBox = true;
|
||||||
translatedFont.bbox = this._bbox;
|
font.bbox = this._bbox;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return this.type3Loaded;
|
return this.#type3Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#removeType3ColorOperators(operatorList, fontBBoxSize = NaN) {
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
_removeType3ColorOperators(operatorList, fontBBoxSize = NaN) {
|
|
||||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
|
||||||
assert(
|
assert(
|
||||||
operatorList.fnArray[0] === OPS.setCharWidthAndBounds,
|
operatorList.fnArray[0] === OPS.setCharWidthAndBounds,
|
||||||
|
|||||||
@ -82,7 +82,6 @@ const EXPORT_DATA_PROPERTIES = [
|
|||||||
"black",
|
"black",
|
||||||
"bold",
|
"bold",
|
||||||
"charProcOperatorList",
|
"charProcOperatorList",
|
||||||
"composite",
|
|
||||||
"cssFontInfo",
|
"cssFontInfo",
|
||||||
"data",
|
"data",
|
||||||
"defaultVMetrics",
|
"defaultVMetrics",
|
||||||
@ -100,22 +99,23 @@ const EXPORT_DATA_PROPERTIES = [
|
|||||||
"missingFile",
|
"missingFile",
|
||||||
"name",
|
"name",
|
||||||
"remeasure",
|
"remeasure",
|
||||||
"subtype",
|
|
||||||
"systemFontInfo",
|
"systemFontInfo",
|
||||||
"type",
|
|
||||||
"vertical",
|
"vertical",
|
||||||
];
|
];
|
||||||
|
|
||||||
const EXPORT_DATA_EXTRA_PROPERTIES = [
|
const EXPORT_DATA_EXTRA_PROPERTIES = [
|
||||||
"cMap",
|
"cMap",
|
||||||
|
"composite",
|
||||||
"defaultEncoding",
|
"defaultEncoding",
|
||||||
"differences",
|
"differences",
|
||||||
"isMonospace",
|
"isMonospace",
|
||||||
"isSerifFont",
|
"isSerifFont",
|
||||||
"isSymbolicFont",
|
"isSymbolicFont",
|
||||||
"seacMap",
|
"seacMap",
|
||||||
|
"subtype",
|
||||||
"toFontChar",
|
"toFontChar",
|
||||||
"toUnicode",
|
"toUnicode",
|
||||||
|
"type",
|
||||||
"vmetrics",
|
"vmetrics",
|
||||||
"widths",
|
"widths",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -543,6 +543,37 @@ const getGlyphMapForStandardFonts = getLookupTableFactory(function (t) {
|
|||||||
t[337] = 9552;
|
t[337] = 9552;
|
||||||
t[493] = 1039;
|
t[493] = 1039;
|
||||||
t[494] = 1040;
|
t[494] = 1040;
|
||||||
|
t[570] = 1040;
|
||||||
|
t[571] = 1041;
|
||||||
|
t[572] = 1042;
|
||||||
|
t[573] = 1043;
|
||||||
|
t[574] = 1044;
|
||||||
|
t[575] = 1045;
|
||||||
|
t[576] = 1046;
|
||||||
|
t[577] = 1047;
|
||||||
|
t[578] = 1048;
|
||||||
|
t[579] = 1049;
|
||||||
|
t[580] = 1050;
|
||||||
|
t[581] = 1051;
|
||||||
|
t[582] = 1052;
|
||||||
|
t[583] = 1053;
|
||||||
|
t[584] = 1054;
|
||||||
|
t[585] = 1055;
|
||||||
|
t[586] = 1056;
|
||||||
|
t[587] = 1057;
|
||||||
|
t[588] = 1058;
|
||||||
|
t[589] = 1059;
|
||||||
|
t[590] = 1060;
|
||||||
|
t[591] = 1061;
|
||||||
|
t[592] = 1062;
|
||||||
|
t[593] = 1063;
|
||||||
|
t[594] = 1064;
|
||||||
|
t[595] = 1065;
|
||||||
|
t[596] = 1066;
|
||||||
|
t[597] = 1067;
|
||||||
|
t[598] = 1068;
|
||||||
|
t[599] = 1069;
|
||||||
|
t[600] = 1070;
|
||||||
t[672] = 1488;
|
t[672] = 1488;
|
||||||
t[673] = 1489;
|
t[673] = 1489;
|
||||||
t[674] = 1490;
|
t[674] = 1490;
|
||||||
|
|||||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -661,6 +661,7 @@
|
|||||||
!bug1868759.pdf
|
!bug1868759.pdf
|
||||||
!issue17730.pdf
|
!issue17730.pdf
|
||||||
!bug1883609.pdf
|
!bug1883609.pdf
|
||||||
|
!issue19550.pdf
|
||||||
!issue17808.pdf
|
!issue17808.pdf
|
||||||
!issue17871_bottom_right.pdf
|
!issue17871_bottom_right.pdf
|
||||||
!issue17871_top_right.pdf
|
!issue17871_top_right.pdf
|
||||||
|
|||||||
117
test/pdfs/issue19550.pdf
Normal file
117
test/pdfs/issue19550.pdf
Normal file
File diff suppressed because one or more lines are too long
@ -3906,6 +3906,13 @@
|
|||||||
"7R": false
|
"7R": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "issue19550",
|
||||||
|
"file": "pdfs/issue19550.pdf",
|
||||||
|
"md5": "4c978bd99348789e05dad1d2a919ddf0",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "issue1127-text",
|
"id": "issue1127-text",
|
||||||
"file": "pdfs/issue1127.pdf",
|
"file": "pdfs/issue1127.pdf",
|
||||||
|
|||||||
23
web/app.js
23
web/app.js
@ -380,7 +380,8 @@ const PDFViewerApplication = {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _initializeViewerComponents() {
|
async _initializeViewerComponents() {
|
||||||
const { appConfig, externalServices, l10n } = this;
|
const { appConfig, externalServices, l10n, mlManager } = this;
|
||||||
|
const abortSignal = this._globalAbortController.signal;
|
||||||
|
|
||||||
const eventBus =
|
const eventBus =
|
||||||
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
|
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
|
||||||
@ -391,7 +392,7 @@ const PDFViewerApplication = {
|
|||||||
)
|
)
|
||||||
: new EventBus();
|
: new EventBus();
|
||||||
this.eventBus = AppOptions.eventBus = eventBus;
|
this.eventBus = AppOptions.eventBus = eventBus;
|
||||||
this.mlManager?.setEventBus(eventBus, this._globalAbortController.signal);
|
mlManager?.setEventBus(eventBus, abortSignal);
|
||||||
|
|
||||||
this.overlayManager = new OverlayManager();
|
this.overlayManager = new OverlayManager();
|
||||||
|
|
||||||
@ -470,10 +471,7 @@ const PDFViewerApplication = {
|
|||||||
null,
|
null,
|
||||||
this.overlayManager,
|
this.overlayManager,
|
||||||
l10n,
|
l10n,
|
||||||
externalServices.createSignatureStorage(
|
externalServices.createSignatureStorage(eventBus, abortSignal),
|
||||||
eventBus,
|
|
||||||
this._globalAbortController.signal
|
|
||||||
),
|
|
||||||
eventBus
|
eventBus
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
@ -510,8 +508,8 @@ const PDFViewerApplication = {
|
|||||||
enableDetailCanvas: AppOptions.get("enableDetailCanvas"),
|
enableDetailCanvas: AppOptions.get("enableDetailCanvas"),
|
||||||
enablePermissions: AppOptions.get("enablePermissions"),
|
enablePermissions: AppOptions.get("enablePermissions"),
|
||||||
pageColors,
|
pageColors,
|
||||||
mlManager: this.mlManager,
|
mlManager,
|
||||||
abortSignal: this._globalAbortController.signal,
|
abortSignal,
|
||||||
enableHWA,
|
enableHWA,
|
||||||
supportsPinchToZoom: this.supportsPinchToZoom,
|
supportsPinchToZoom: this.supportsPinchToZoom,
|
||||||
enableAutoLinking: AppOptions.get("enableAutoLinking"),
|
enableAutoLinking: AppOptions.get("enableAutoLinking"),
|
||||||
@ -529,7 +527,7 @@ const PDFViewerApplication = {
|
|||||||
renderingQueue: pdfRenderingQueue,
|
renderingQueue: pdfRenderingQueue,
|
||||||
linkService: pdfLinkService,
|
linkService: pdfLinkService,
|
||||||
pageColors,
|
pageColors,
|
||||||
abortSignal: this._globalAbortController.signal,
|
abortSignal,
|
||||||
enableHWA,
|
enableHWA,
|
||||||
});
|
});
|
||||||
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
|
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
|
||||||
@ -574,15 +572,12 @@ const PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (mlManager && appConfig.secondaryToolbar?.imageAltTextSettingsButton) {
|
||||||
this.mlManager &&
|
|
||||||
appConfig.secondaryToolbar?.imageAltTextSettingsButton
|
|
||||||
) {
|
|
||||||
this.imageAltTextSettings = new ImageAltTextSettings(
|
this.imageAltTextSettings = new ImageAltTextSettings(
|
||||||
appConfig.altTextSettingsDialog,
|
appConfig.altTextSettingsDialog,
|
||||||
this.overlayManager,
|
this.overlayManager,
|
||||||
eventBus,
|
eventBus,
|
||||||
this.mlManager
|
mlManager
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1173,6 +1173,7 @@ class PDFViewer {
|
|||||||
this.#hiddenCopyElement?.remove();
|
this.#hiddenCopyElement?.remove();
|
||||||
this.#hiddenCopyElement = null;
|
this.#hiddenCopyElement = null;
|
||||||
|
|
||||||
|
this.#cleanupTimeouts();
|
||||||
this.#cleanupSwitchAnnotationEditorMode();
|
this.#cleanupSwitchAnnotationEditorMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2340,6 +2341,17 @@ class PDFViewer {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#cleanupTimeouts() {
|
||||||
|
if (this.#scaleTimeoutId !== null) {
|
||||||
|
clearTimeout(this.#scaleTimeoutId);
|
||||||
|
this.#scaleTimeoutId = null;
|
||||||
|
}
|
||||||
|
if (this.#scrollTimeoutId !== null) {
|
||||||
|
clearTimeout(this.#scrollTimeoutId);
|
||||||
|
this.#scrollTimeoutId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#cleanupSwitchAnnotationEditorMode() {
|
#cleanupSwitchAnnotationEditorMode() {
|
||||||
this.#switchAnnotationEditorModeAC?.abort();
|
this.#switchAnnotationEditorModeAC?.abort();
|
||||||
this.#switchAnnotationEditorModeAC = null;
|
this.#switchAnnotationEditorModeAC = null;
|
||||||
@ -2466,14 +2478,8 @@ class PDFViewer {
|
|||||||
for (const pageView of this._pages) {
|
for (const pageView of this._pages) {
|
||||||
pageView.update(updateArgs);
|
pageView.update(updateArgs);
|
||||||
}
|
}
|
||||||
if (this.#scaleTimeoutId !== null) {
|
this.#cleanupTimeouts();
|
||||||
clearTimeout(this.#scaleTimeoutId);
|
|
||||||
this.#scaleTimeoutId = null;
|
|
||||||
}
|
|
||||||
if (this.#scrollTimeoutId !== null) {
|
|
||||||
clearTimeout(this.#scrollTimeoutId);
|
|
||||||
this.#scrollTimeoutId = null;
|
|
||||||
}
|
|
||||||
if (!noUpdate) {
|
if (!noUpdate) {
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,6 +177,7 @@ class SignatureManager {
|
|||||||
"click",
|
"click",
|
||||||
() => {
|
() => {
|
||||||
this.#reportTelemetry({
|
this.#reportTelemetry({
|
||||||
|
type: "signature",
|
||||||
action: "pdfjs.signature.clear",
|
action: "pdfjs.signature.clear",
|
||||||
data: {
|
data: {
|
||||||
type: this.#currentTab,
|
type: this.#currentTab,
|
||||||
@ -738,6 +739,7 @@ class SignatureManager {
|
|||||||
if (await this.#signatureStorage.delete(uuid)) {
|
if (await this.#signatureStorage.delete(uuid)) {
|
||||||
div.remove();
|
div.remove();
|
||||||
this.#reportTelemetry({
|
this.#reportTelemetry({
|
||||||
|
type: "signature",
|
||||||
action: "pdfjs.signature.delete_saved",
|
action: "pdfjs.signature.delete_saved",
|
||||||
data: {
|
data: {
|
||||||
savedCount: await this.#signatureStorage.size(),
|
savedCount: await this.#signatureStorage.size(),
|
||||||
@ -924,6 +926,7 @@ class SignatureManager {
|
|||||||
|
|
||||||
const altText = this.#tabsToAltText.get(type);
|
const altText = this.#tabsToAltText.get(type);
|
||||||
this.#reportTelemetry({
|
this.#reportTelemetry({
|
||||||
|
type: "signature",
|
||||||
action: "pdfjs.signature.created",
|
action: "pdfjs.signature.created",
|
||||||
data: {
|
data: {
|
||||||
type,
|
type,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user