Christopher Steinbach
1 month ago
#47520
::
Hi Steffen,
thank you for this great idea. I think that does the trick for me.
Here’s my final solution for the latest pdfJS libarary using modules:
const fullLibPath = ${SimplifierLoader.libraryRoot}/${sLibPath}
;
import(${fullLibPath}/pdf.min.mjs
).then((pdfjsLib) => {
window.pdfjsLib = pdfjsLib;
window.pdfjsLib.GlobalWorkerOptions.workerSrc = ${fullLibPath}/pdf.worker.min.mjs
;
});
I added the simplifier lib path to use the pdfjs lib uploaded to the simplifier server instead of the mozilla served lib.