Repository navigation
v267.8.0 — Bundled pdf.js fallback viewer
Browsers that cannot render PDFs inside an iframe — notably Chromium
on Android — showed a placeholder instead of the document. mdrvserve
now bundles pdf.js and swaps it in for those browsers only, so every
browser gets an inline PDF. This is why the release is a minor bump:
the two vendored assets add ~1.5 MB to the binary.
Added
- Automatic pdf.js fallback. The PDF wrapper page detects browsers
without an inline PDF viewer (pdfViewerEnabledfalse, or Chromium
on Android, whose viewer reportsnavigator.pdfViewerEnabledbut
refuses iframe embeds) and renders the document through a bundled
pdf.js canvas viewer instead of the native iframe. Desktop Chrome
and Firefox keep using their built-in viewers, unchanged. The choice
can be forced either way with?pdfjs=1or?pdfjs=0on the page
URL. The sidebar stays available in both paths. - Pinch zoom. In the fallback viewer, pinch gestures zoom the
current page from 1× to 5×; the canvas is re-rendered at the new
resolution, so text stays crisp. Moving to another page resets the
zoom, and a double-tap or double-click returns to fit-width. - Horizontal slideshow mode. A toggle in the corner switches the
fallback viewer to one page per screen with horizontal swipe and
scroll snapping, plus ann / Npage indicator; the choice persists
per browser.
pdf.js 3.11.174 (Apache-2.0) is vendored into the binary and served
lazily from /pdf.min.js and /pdf.worker.min.js, fetched only when
the fallback is actually used.