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) {