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.

Customization

Defaults through BitParams, styling every part of the viewer with classes, styles and CSS variables, and right-to-left layouts.

Cascading parameters

BitParams with a BitPdfViewerParams sets defaults - strings, toolbar, size, zoom, styles - for every viewer under it. A viewer's own value wins (the second keeps its own toolbar).



0 page(s).
100%
Both viewers share their defaults - load a document.

0 page(s).
100%
Both viewers share their defaults - load a document.

Style & Class

Style and Class reach the root; Styles and Classes reach each part. The public --bit-PdfViewer-* CSS variables restyle a viewer here, or every viewer from :root - the third one also reads in a dark mode through --bit-PdfViewer-page-filter.



Component's Style & Class:

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


Styles & Classes:

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


CSS variables:

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

RTL

With Dir set to Rtl the toolbar, sidebars and find box flip; the page navigation and the zoom out / zoom in pair keep their left-to-right order, as numbers do, and page content keeps the orientation the document defines.



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.