Blazorise PdfViewer: API Reference

Explore the API reference for the Blazorise PdfViewer component, detailing available attributes and methods.

All media elements exist inside the Video component. This component's main responsibilities are to manage media state updates, dispatch media events, handle media requests, and expose media state through HTML attributes and CSS properties for styling purposes.

API

Parameters

PdfViewer

Parameter Description TypeDefault
ChildContent

Gets or sets the content to be rendered inside the component.

Remarks

This property allows developers to define custom content within the PDF viewer component.

RenderFragmentnull
Orientation

Gets or sets the orientation of the PDF document. The default value is PdfViewer.PdfOrientation.Portrait.

Possible values:Portrait, Landscape

PdfOrientationPdfOrientation.Portrait
PageNumber

Gets or sets the current page number of the PDF document. The default value is 1.

int1
Scale

Gets or sets the scale factor for displaying the PDF document. The default value is 1, which represents the original size.

double1
Source

Gets or sets the source URL or base64 formated string of the PDF document to be loaded.

string

PdfViewerContainer

Parameter Description TypeDefault
ChildContent

Gets or sets the content to be rendered inside the component.

Remarks

This property allows developers to define custom content within the PDF container component.

RenderFragmentnull

PdfViewerToolbar

Parameter Description TypeDefault
ShowPaging

Defines if the paging buttons should be displayed.

booltrue
ShowPrinting

Defines if the print button should be displayed.

booltrue
ShowZooming

Defines if the zoom buttons should be displayed.

booltrue

Events

PdfViewer

Event Description Type
Loaded

Gets or sets the callback event that is triggered when the PDF document is loaded.

EventCallback<PdfLoadedEventArgs>
PageNumberChanged

Gets or sets the callback event that is triggered when the page number changes.

EventCallback<int>
ScaleChanged

Gets or sets the callback event that is triggered when the scale changes.

EventCallback<double>

Methods

PdfViewer

Method DescriptionReturnParameters
PreviousPage Navigates to the previous page of the PDF document. Task
NextPage Navigates to the next page of the PDF document. Task
GoToPage Navigates to the specified page number in the PDF document. Taskint pageNumber
SetScale Sets the scale factor for displaying the PDF document. Taskdouble scale
Print Prints the currently loaded PDF document. Task
NotifyPdfInitialized Notifies that a PDF document has been loaded. TaskPdfModel model
NotifyPdfChanged Notifies that the page number of the PDF document has changed. TaskPdfModel model
On this page