From 7273db2e357a04b3a62af43b734de0efdf21ede9 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 28 Feb 2025 12:41:47 +0100 Subject: [PATCH] Don't attempt to use auto-linking in XFA documents (PR 19110 follow-up) Auto-linking requires a normal textLayer which XFA documents obviously don't have, and currently XFA documents cause "pointless" error messages to be logged in the console. --- web/pdf_page_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index b0395530f..618b6b6c5 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -1064,7 +1064,7 @@ class PDFPageView extends BasePDFPageView { if (this.annotationLayer) { await this.#renderAnnotationLayer(); - if (this.#enableAutoLinking && this.annotationLayer) { + if (this.#enableAutoLinking && this.annotationLayer && this.textLayer) { await this.#injectLinkAnnotations(textLayerPromise); } }