Lumeo

PDF Viewer

Inline PDF document viewer powered by Mozilla pdf.js — renders documents page-by-page on a canvas with page navigation, zoom controls, optional text search, and a download shortcut.

When to Use

  • Embedding PDFs (contracts, invoices, reports) inline in a Blazor page
  • Document preview surfaces where the browser's built-in viewer is too heavy or inconsistent
  • Read-only flows that benefit from page navigation, zoom, and text search
/ 0
100%
Page 1 of 0 — zoom 100%

API Reference

PdfViewer

Prop Type Default Description
Srcstring?nullPDF URL or data: URL. Required.
Pageint11-based current page. Two-way bindable.
PageChangedEventCallback<int>Fires when the user navigates to a different page.
Zoomdouble1.0Render scale clamped to [0.5, 4.0]. Two-way bindable.
ZoomChangedEventCallback<double>Fires when the user changes zoom.
ShowToolbarbooltrueHide the whole toolbar row for a chromeless embed.
ShowPageNavbooltrueShow prev/next + page input.
ShowZoomControlsbooltrueShow ± zoom buttons and percentage.
ShowDownloadbooltrueShow the download shortcut linking to Src.
ShowSearchboolfalseShow the text-search input (returns total match count).
OnLoadedEventCallback<int>Fires once with the total page count when the PDF finishes loading.
OnPageChangedEventCallback<int>Non-binding alternative to PageChanged.
OnErrorEventCallback<string>Fires when the PDF fails to load or render (CDN unreachable, malformed PDF, worker init failure). Receives the exception message; the built-in EmptyState fallback still renders.
Classstring?nullExtra CSS classes on the root container.
Accessibility. The canvas wrapper renders role="document" with aria-label="PDF document" and a tabindex="0" so it receives keyboard focus. PageDown / ArrowRight advances, PageUp / ArrowLeft rewinds, and + / - zoom.