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 | Type | Default |
---|---|---|---|
ChildContent |
Gets or sets the content to be rendered inside the component. RemarksThis property allows developers to define custom content within the PDF viewer component. |
RenderFragment | null |
Orientation |
Gets or sets the orientation of the PDF document. The default value is PdfViewer.PdfOrientation.Portrait. Possible values: |
PdfOrientation | PdfOrientation.Portrait |
PageNumber |
Gets or sets the current page number of the PDF document. The default value is |
int | 1 |
Scale |
Gets or sets the scale factor for displaying the PDF document. The default value is |
double | 1 |
Source |
Gets or sets the source URL or base64 formated string of the PDF document to be loaded. |
string |
PdfViewerContainer
Parameter | Description | Type | Default |
---|---|---|---|
ChildContent |
Gets or sets the content to be rendered inside the component. RemarksThis property allows developers to define custom content within the PDF container component. |
RenderFragment | null |
PdfViewerToolbar
Parameter | Description | Type | Default |
---|---|---|---|
ShowPaging |
Defines if the paging buttons should be displayed. |
bool | true |
ShowPrinting |
Defines if the print button should be displayed. |
bool | true |
ShowZooming |
Defines if the zoom buttons should be displayed. |
bool | true |
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 | Description | Return | Parameters |
---|---|---|---|
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. | Task | int pageNumber |
SetScale |
Sets the scale factor for displaying the PDF document. | Task | double scale |
Print |
Prints the currently loaded PDF document. | Task | |
NotifyPdfInitialized |
Notifies that a PDF document has been loaded. | Task | PdfModel model |
NotifyPdfChanged |
Notifies that the page number of the PDF document has changed. | Task | PdfModel model |