This change pins both the main pdfjs-dist runtime and the web-worker to version 3.11.174—the version officially supported by react-pdf.
Keeping the versions identical eliminates the protocol mismatch that triggered the “Transport destroyed” error when rendering pages.
Re-load the preview and the PDF pages should now display correctly.
To eliminate the version mismatch, always load the worker that matches the pdf.js runtime shipped with react-pdf.react-pdf exposes that runtime on pdfjs, so we can build every CDN URL from pdfjs.version.
With the worker, cmap and font URLs now built from pdfjs.version, the API (currently “5.3.31”) and worker always stay identical, removing the “API version … does not match Worker version …” error.
Re-upload any PDF and it should render correctly.