Skip to content

Extras

PdfViewer

Bit.BlazorUI.ExtrasPdfReaderPdf

BitPdfViewer is a native pure-C# pdf viewer for Blazor: it parses pdf files and paints their pages as plain HTML/CSS (or onto a canvas), with no browser plugin and no js library. It ships a full reading toolbar - navigation, zoom and fit modes, page layouts, rotation, find, thumbnails, bookmarks, attachments and layers, printing, download, presentation and fullscreen - and everything the toolbar does is on the public API too.

Zoom, layout & rendering

Zoom modes and limits, scroll and spread modes, finding text in the document, and how pages are rendered.

Zoom

InitialZoomMode picks the starting fit: Automatic (fit width, capped at 125%), FitWidth, FitPage, FitHeight or ActualSize. ZoomPresets replaces the dropdown's percentages; MinZoom, MaxZoom and ZoomStep bound and pace every zoom, including Ctrl+wheel and pinch, which keep the point under the cursor in place.



0 page(s).
100%
No document loaded.

Page layout

ScrollMode stacks pages vertically, lays them in a horizontal row, wraps them, or shows one at a time (a swipe turns it on touch). SpreadMode pairs them like an open book (Even keeps page 1 as a cover), and CursorTool switches dragging between selecting text and panning. Presentation mode (Ctrl+Alt+P) combines them fullscreen and restores the layout on exit.




0 page(s).
100%
No document loaded.

Find in document

Matches are counted over the whole document without rendering it, and painted with the CSS Custom Highlight API. The options match case, whole words and diacritics (off by default, so resume finds résumé), and paint every match or only the current one. Search, SetSearchOptions, FindNext and ClearSearch do the same from code.




0 page(s).
100%
No document loaded.

Rendering

RenderMode: Html (default) lays pages out as prerenderable positioned DOM; Canvas paints them onto a canvas - far fewer DOM nodes - while selection, find and links keep working. TextCoalescing: Compact merges same-line runs into one span per line, at a small position cost. BackgroundRendering moves the work off the UI thread where the runtime has a spare one.

RenderMode
TextCoalescing



0 page(s).
100%
No document loaded.

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.