1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

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.
This commit is contained in:
Jonas Jenwald 2025-02-28 12:41:47 +01:00
parent 50c573d16d
commit 7273db2e35

View file

@ -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);
}
}