PDF.js in Joomla: errors and troubleshooting

WT PDF.js - Documentation

JSON is awaited for up to five seconds.

Diagnose assets, PDF files and configuration

JSON is awaited for up to five seconds. Network/HTTP errors, redirects, invalid JSON, array roots and invalid names fall back to standard PDF.js behavior. Search the console for [WT PDF.js user-config]. Invalid individual options do not prevent other accepted values from applying.

SymptomCheck
Unknown assetInstalled/enabled plugin, code after registration, explicit registration in administrator pages.
pdfjsLib is undefinedAsset activated, consumer waits for the library, server/CSP allows .mjs.
Worker version mismatchOne build per window, matching library/worker, clear stale caches.
PDF will not openEncoded file value, file exists, matching origin; endpoint returns PDF rather than login HTML.
JSON ignoredNetwork: correct URL and 200 JSON; lowercase .json, flat object, correct types; console warnings.
Different zoomCheck #zoom and viewOnLoad: fragments and document history affect startup.
Missing fonts/imagesMatching cmaps, standard_fonts, wasm and iccs are available; paths account for subdirectories.
Unreadable code in dark JoomlaUse matching bg-body and text-body, without forced bg-white.

Serve .mjs with a JavaScript MIME type. Open viewers over HTTP(S), not file://. Iframe sandbox restrictions on scripts or origin may prevent module/JSON loading. During troubleshooting, open the same viewer URL in a separate tab.

WebTolk Joomla Extensions

113 Extensions
12 Categories
582 Versions released
893721 Downloads