Opening the PDF slideshow viewer on an attached PDF still failed with a 415
after the previous #6685 fix, now with the real error visible:
"Setting up fake worker failed: Cannot find module
'.../_build/main-dev/pdf.worker.mjs'". pdfjs-dist's Node fake-worker
fallback locates pdf.worker.mjs relative to import.meta.url of the module
that imported it; under the bundled server (_build/main-dev,
_build/main-prod) that URL points into the bundle output, not into
node_modules, so the fallback looked for the worker beside the bundled
server.cjs and never found it - every PDF preview failed, image and text
alike, not only the rasterized-image path the earlier fix addressed.
Point GlobalWorkerOptions.workerSrc at the real on-disk file via Node's own
module resolution (the same runtimeRequire trick already used for fflate)
so pdfjs never falls back to guessing. pdf-to-img imports the same single
pdfjs-dist instance, so this also fixes its internal rasterization.
Thanks to rmb82 and xet7 !