From d19d87b8f06ca8731b478984777da7696e5aab83 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:23:29 +0000 Subject: [PATCH] Update downloader.js --- src/main/resources/static/js/downloader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index bab75025..2ccbc093 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -99,6 +99,7 @@ async function getPDFPageCount(file) { try { const arrayBuffer = await file.arrayBuffer(); + pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdfjs-legacy/pdf.worker.mjs' const pdf = await pdfjsLib.getDocument({ data: arrayBuffer }).promise; return pdf.numPages; } catch (error) {