1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Enable automatic URL linking

Automatically detect links in the text content of a file and automatically
generate link annotations at the appropriate locations to achieve
automatic link detection and hyperlinking.
This commit is contained in:
Ujjwal Sharma 2024-11-12 11:26:32 +05:30
parent 90a5c37cb0
commit 61ba1ea48c
20 changed files with 656 additions and 14 deletions

View file

@ -353,6 +353,7 @@ const PDFViewerApplication = {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
Object.assign(opts, {
enableAltText: x => x === "true",
enableAutoLinking: x => x === "true",
enableFakeMLManager: x => x === "true",
enableGuessAltText: x => x === "true",
enableUpdatedAddImage: x => x === "true",
@ -492,6 +493,7 @@ const PDFViewerApplication = {
abortSignal: this._globalAbortController.signal,
enableHWA,
supportsPinchToZoom: this.supportsPinchToZoom,
enableAutoLinking: AppOptions.get("enableAutoLinking"),
});
this.pdfViewer = pdfViewer;