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.

Documents & states

Reading a document's metadata, opening encrypted documents, and the loading, empty and error states.

Document info

The toolbar's info button opens the properties dialog. The same data is on the reference - Metadata, Permissions, PageLabels, FormFields, StructureTree and the parsed Document - for indexing or auditing without parsing twice.



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

Encrypted documents

An encrypted document asks for its password in a built-in dialog. WithPassword carries a known one on the source, OnPasswordRequested replaces the dialog with your own UI, and ShowPasswordPrompt=false reports the failure through OnError instead. RespectPermissions enforces the owner's no-print / no-copy flags (advisory, so off by default).

Select an encrypted pdf file to try it:


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

Loading, empty & error states

LoadingTemplate replaces the page-shaped placeholder while a document is fetched and parsed, EmptyTemplate the message of a viewer with no document, and ErrorTemplate that of a failed load, with the message OnError receives. A failure is announced as an alert either way.



0 page(s).
100%
Drop a pdf file here.

Feedback

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