- bit BlazorUI

PdfReader

BitPdfReader is a simple pdf renderer utilizing the pdfjs library to bring pdf reading feature into Blazor world.

Notes

To use this component, you need to install the `Bit.BlazorUI.Extras` nuget package, as described in the Optional steps of the Getting started page.

Usage

Basic
RenderAllPages
Public API
   
/
   |

API

BitPdfReader parameters
Name
Type
Default value
Description
CanvasClass string? null The CSS class of the canvas element(s).
CanvasStyle string? null The CSS style of the canvas element(s).
Class string? null The CSS class of the root element.
Config BitPdfReaderConfig The configuration of the pdf reader.
Horizontal bool false Renders the pages horizontally.
InitialPageNumber int 1 The page number to render initially.
OnPdfPageRendered EventCallback The callback for when the pdf page is done rendering.
OnPdfLoaded EventCallback The callback for when the pdf document is done loading and processing.
RenderAllPages bool false Whether render all pages at start.
Style string? null The CSS style of the root element.
BitPdfReaderConfig properties
Name
Type
Default value
Description
Id string Guid.NewGuid().ToString() The id of the pdf reader instance and its canvas element(s).
Url string The URL of the pdf file.
Scale decimal 1 The scale in which the pdf document gets rendered on the page.
AutoScale bool true Automatically scales the pdf based on the device pixel-ratio.
  • On this page