Class
TelerikPdfViewer

The class for the Telerik PDF Viewer.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikPdfViewer : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikPdfViewer

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikPdfViewer()

Declaration

cs-api-definition
public TelerikPdfViewer()

Properties

AnnotationMode

Specifies whether the PDF Viewer renders interactive forms (form filling) for the file. If set to EnableForms, the PDF viewer will render supported form elements such as TextBox, CheckBox, DropDown, RadioButton, and Button.

Declaration

cs-api-definition
[Parameter]
public PdfViewerAnnotationMode AnnotationMode { get; set; }

Property Value

PdfViewerAnnotationMode

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Data

Specifies the file data of the component.

Declaration

cs-api-definition
[Parameter]
public byte[] Data { get; set; }

Property Value

byte[]

DialogFactory

Declaration

cs-api-definition
[CascadingParameter]
protected DialogFactory DialogFactory { get; set; }

Property Value

DialogFactory

EnableLoaderContainer

Defines whether the loading container should be shown when there are long-running operations.

Declaration

cs-api-definition
[Parameter]
public bool EnableLoaderContainer { get; set; }

Property Value

bool

Height

Specifies the height of the component.

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

MaxZoom

Specifies the max zoom level.

Declaration

cs-api-definition
[Parameter]
public decimal MaxZoom { get; set; }

Property Value

decimal

MinZoom

Specifies the min zoom level.

Declaration

cs-api-definition
[Parameter]
public decimal MinZoom { get; set; }

Property Value

decimal

OnDownload

Triggered when a file is downloaded.

Declaration

cs-api-definition
[Parameter]
public EventCallback<PdfViewerDownloadEventArgs> OnDownload { get; set; }

Property Value

EventCallback<PdfViewerDownloadEventArgs>

OnError

Triggered when a file error is thrown.

Declaration

cs-api-definition
[Parameter]
public EventCallback<PdfViewerErrorEventArgs> OnError { get; set; }

Property Value

EventCallback<PdfViewerErrorEventArgs>

OnOpen

Triggered when a file is opened.

Declaration

cs-api-definition
[Parameter]
public EventCallback<PdfViewerOpenEventArgs> OnOpen { get; set; }

Property Value

EventCallback<PdfViewerOpenEventArgs>

RenderScale

Specifies the render scale of the document. Using a higher value will increase the quality of the rendered document, but will also increase the memory consumption.

Declaration

cs-api-definition
[Parameter]
public double RenderScale { get; set; }

Property Value

double

Width

Specifies the width of the component.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Zoom

Specifies the zoom level.

Declaration

cs-api-definition
[Parameter]
public decimal Zoom { get; set; }

Property Value

decimal

ZoomChanged

Triggered when the zoom is changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<decimal> ZoomChanged { get; set; }

Property Value

EventCallback<decimal>

ZoomRate

Specifies the zoom rate.

Declaration

cs-api-definition
[Parameter]
public decimal ZoomRate { get; set; }

Property Value

decimal

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public override void Dispose()

Overrides BaseComponent.Dispose()

GetFileAsync()

Gets the PDF file data as a byte array, including any annotations or form filling changes.

Declaration

cs-api-definition
public Task<byte[]> GetFileAsync()

Returns

Task<byte[]>

A task that represents the asynchronous operation. The task result contains the PDF data as a byte array, or null if no document is loaded.

InitJsComponentAsync()

Declaration

cs-api-definition
protected Task InitJsComponentAsync()

Returns

Task

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides ComponentBase.OnParametersSetAsync()

Print()

Prints the loaded PDF file.

Declaration

cs-api-definition
public void Print()

Rebind()

Updates the component and processes the latest file data.

Declaration

cs-api-definition
public void Rebind()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)