Class
RadPdfViewer

A comprehensive PDF document viewer control for .NET MAUI applications that provides rich document display, navigation, zooming, text search, text selection, and interactive features. The RadPdfViewer offers professional-grade PDF viewing capabilities with extensive customization options and seamless integration with complementary controls.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadPdfViewer : RadLayout

Inheritance: objectRadLayoutRadPdfViewer

Inherited Members RadLayout.CreateLayoutManager()

Constructors

RadPdfViewer()

Initializes a new instance of the RadPdfViewer class.

Declaration

cs-api-definition
public RadPdfViewer()

Fields

BackgroundColorProperty

Identifies the BackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

BusyIndicatorTemplateProperty

Identifies the BusyIndicatorTemplate property.

Declaration

cs-api-definition
public static readonly BindableProperty BusyIndicatorTemplateProperty

Field Value

BindableProperty

CloseSearchViewCommandProperty

Identifies the CloseSearchViewCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty CloseSearchViewCommandProperty

Field Value

BindableProperty

DocumentProperty

Identifies the Document property.

Declaration

cs-api-definition
public static readonly BindableProperty DocumentProperty

Field Value

BindableProperty

DoubleTappedCommandProperty

Identifies the DoubleTappedCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty DoubleTappedCommandProperty

Field Value

BindableProperty

FitToWidthCommandProperty

Identifies the FitToWidthCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty FitToWidthCommandProperty

Field Value

BindableProperty

LayoutModeProperty

Identifies the LayoutMode property.

Declaration

cs-api-definition
public static readonly BindableProperty LayoutModeProperty

Field Value

BindableProperty

MaxZoomLevelProperty

Identifies the MaxZoomLevel property.

Declaration

cs-api-definition
public static readonly BindableProperty MaxZoomLevelProperty

Field Value

BindableProperty

MinZoomLevelProperty

Identifies the MinZoomLevel property.

Declaration

cs-api-definition
public static readonly BindableProperty MinZoomLevelProperty

Field Value

BindableProperty

NavigateToNextPageCommandProperty

Identifies the NavigateToNextPageCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty NavigateToNextPageCommandProperty

Field Value

BindableProperty

NavigateToNextSearchResultCommandProperty

Identifies the NavigateToNextSearchResultCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty NavigateToNextSearchResultCommandProperty

Field Value

BindableProperty

NavigateToPageCommandProperty

Identifies the NavigateToPageCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty NavigateToPageCommandProperty

Field Value

BindableProperty

NavigateToPreviousPageCommandProperty

Identifies the NavigateToPreviousPageCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty NavigateToPreviousPageCommandProperty

Field Value

BindableProperty

NavigateToPreviousSearchResultCommandProperty

Identifies the NavigateToPreviousSearchResultCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty NavigateToPreviousSearchResultCommandProperty

Field Value

BindableProperty

OpenSearchViewCommandProperty

Identifies the OpenSearchViewCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty OpenSearchViewCommandProperty

Field Value

BindableProperty

PageSpacingProperty

Identifies the PageSpacing property.

Declaration

cs-api-definition
public static readonly BindableProperty PageSpacingProperty

Field Value

BindableProperty

SearchSettingsProperty

Identifies the SearchSettings property.

Declaration

cs-api-definition
public static readonly BindableProperty SearchSettingsProperty

Field Value

BindableProperty

SelectionSettingsProperty

Identifies the SelectionSettings property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectionSettingsProperty

Field Value

BindableProperty

SourceExceptionTemplateProperty

Identifies the SourceExceptionTemplate property.

Declaration

cs-api-definition
public static readonly BindableProperty SourceExceptionTemplateProperty

Field Value

BindableProperty

SourceProperty

Identifies the Source property.

Declaration

cs-api-definition
public static readonly BindableProperty SourceProperty

Field Value

BindableProperty

ToggleLayoutModeCommandProperty

Identifies the ToggleLayoutModeCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ToggleLayoutModeCommandProperty

Field Value

BindableProperty

ViewportProperty

Identifies the Viewport property.

Declaration

cs-api-definition
public static readonly BindableProperty ViewportProperty

Field Value

BindableProperty

VisiblePagesCountProperty

Identifies the VisiblePagesCount property.

Declaration

cs-api-definition
public static readonly BindableProperty VisiblePagesCountProperty

Field Value

BindableProperty

VisiblePagesStartIndexProperty

Identifies the VisiblePagesStartIndex property.

Declaration

cs-api-definition
public static readonly BindableProperty VisiblePagesStartIndexProperty

Field Value

BindableProperty

ZoomInCommandProperty

Identifies the ZoomInCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomInCommandProperty

Field Value

BindableProperty

ZoomLevelProperty

Identifies the ZoomLevel property.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomLevelProperty

Field Value

BindableProperty

ZoomOutCommandProperty

Identifies the ZoomOutCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomOutCommandProperty

Field Value

BindableProperty

Properties

BackgroundColor

Gets or sets the background color of the PDF viewer.

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

BusyIndicatorTemplate

Gets or sets the template for the busy indicator displayed during document loading.

Declaration

cs-api-definition
public DataTemplate BusyIndicatorTemplate { get; set; }

Property Value

DataTemplate

CloseSearchViewCommand

Gets or sets the ICommand which closes the PdfViewerSearchContentView.

Declaration

cs-api-definition
public ICommand CloseSearchViewCommand { get; set; }

Property Value

ICommand

Document

Gets the currently loaded PDF document.

Declaration

cs-api-definition
public RadFixedDocument Document { get; }

Property Value

RadFixedDocument

DoubleTappedCommand

Gets or sets the command executed when the viewer is double-tapped. The parameter of this command is of type Point and it represents the relative position of the tap, i.e. values between 0 and 1 in the scope of the PdfViewer.

Declaration

cs-api-definition
public ICommand DoubleTappedCommand { get; set; }

Property Value

ICommand

EnableHardwareAcceleration

Gets a value indicating whether the GPU should be used for rendering. When set to true, is used and rendering is performed using the GPU. When set to false, is used and rendering is performed using the CPU.

Declaration

cs-api-definition
public bool EnableHardwareAcceleration { get; set; }

Property Value

bool

FitToWidthCommand

Gets or sets the command to fit the document to width.

Declaration

cs-api-definition
public ICommand FitToWidthCommand { get; set; }

Property Value

ICommand

LayoutMode

Gets or sets the layout mode for displaying PDF pages.

Declaration

cs-api-definition
public LayoutMode LayoutMode { get; set; }

Property Value

LayoutMode

MaxZoomLevel

Gets or sets the maximum zoom level allowed.

Declaration

cs-api-definition
public double MaxZoomLevel { get; set; }

Property Value

double

MinZoomLevel

Gets or sets the minimum zoom level allowed.

Declaration

cs-api-definition
public double MinZoomLevel { get; set; }

Property Value

double

NavigateToNextPageCommand

Gets or sets the command to navigate to the next page.

Declaration

cs-api-definition
public ICommand NavigateToNextPageCommand { get; set; }

Property Value

ICommand

NavigateToNextSearchResultCommand

Gets the ICommand executed when navigating to the next search result.

Declaration

cs-api-definition
public ICommand NavigateToNextSearchResultCommand { get; }

Property Value

ICommand

NavigateToPageCommand

Gets or sets the command to navigate to a specific page. The parameter of this command is of type int and it represents the page index.

Declaration

cs-api-definition
public ICommand NavigateToPageCommand { get; set; }

Property Value

ICommand

NavigateToPreviousPageCommand

Gets or sets the command to navigate to the previous page.

Declaration

cs-api-definition
public ICommand NavigateToPreviousPageCommand { get; set; }

Property Value

ICommand

NavigateToPreviousSearchResultCommand

Gets the ICommand executed when navigating to the previous search result.

Declaration

cs-api-definition
public ICommand NavigateToPreviousSearchResultCommand { get; }

Property Value

ICommand

OpenSearchViewCommand

Gets or sets the ICommand which opens the PdfViewerSearchContentView.

Declaration

cs-api-definition
public ICommand OpenSearchViewCommand { get; set; }

Property Value

ICommand

PageSpacing

Gets or sets the spacing between pages in continuous layout mode.

Declaration

cs-api-definition
public double PageSpacing { get; set; }

Property Value

double

SearchContentView

Gets the search content view for the PDF viewer.

Declaration

cs-api-definition
public PdfViewerSearchContentView SearchContentView { get; }

Property Value

PdfViewerSearchContentView

SearchSettings

Gets or sets the settings for search functionality in the PDF viewer.

Declaration

cs-api-definition
public PdfViewerSearchSettings SearchSettings { get; set; }

Property Value

PdfViewerSearchSettings

SelectionSettings

Gets or sets the settings for text selection in the PDF viewer.

Declaration

cs-api-definition
public PdfViewerSelectionSettings SelectionSettings { get; set; }

Property Value

PdfViewerSelectionSettings

Source

Gets or sets the document source for the PDF viewer.

Declaration

cs-api-definition
public DocumentSource Source { get; set; }

Property Value

DocumentSource

SourceExceptionTemplate

Gets or sets the template for displaying source exceptions.

Declaration

cs-api-definition
public DataTemplate SourceExceptionTemplate { get; set; }

Property Value

DataTemplate

ToggleLayoutModeCommand

Gets or sets the command to toggle the layout mode.

Declaration

cs-api-definition
public ICommand ToggleLayoutModeCommand { get; set; }

Property Value

ICommand

Viewport

Gets the current viewport rectangle of the document.

Declaration

cs-api-definition
public Rect Viewport { get; }

Property Value

Rect

VisiblePagesCount

Gets the number of visible pages.

Declaration

cs-api-definition
public int VisiblePagesCount { get; }

Property Value

int

VisiblePagesStartIndex

Gets the index of the first visible page.

Declaration

cs-api-definition
public int VisiblePagesStartIndex { get; }

Property Value

int

ZoomInCommand

Gets or sets the command to zoom in the document.

Declaration

cs-api-definition
public ICommand ZoomInCommand { get; set; }

Property Value

ICommand

ZoomLevel

Gets the current zoom level of the document.

Declaration

cs-api-definition
public double ZoomLevel { get; }

Property Value

double

ZoomOutCommand

Gets or sets the command to zoom out the document.

Declaration

cs-api-definition
public ICommand ZoomOutCommand { get; set; }

Property Value

ICommand

Methods

ChangeViewport(Rect)

Changes the Viewport property to the desired value.

Declaration

cs-api-definition
public void ChangeViewport(Rect viewport)

Parameters

viewport

Rect

The new value of the Viewport property.

NavigateToPage(int)

Navigates to the specified page index.

Declaration

cs-api-definition
public void NavigateToPage(int index)

Parameters

index

int

The zero-based index of the page to navigate to.

OnChildAdded(Element)

Called when a child element is added to the PDF viewer.

Declaration

cs-api-definition
protected override void OnChildAdded(Element child)

Parameters

child

Element

The child element that was added.

OnChildRemoved(Element, int)

Called when a child element is removed from the PDF viewer.

Declaration

cs-api-definition
protected override void OnChildRemoved(Element child, int oldLogicalIndex)

Parameters

child

Element

The child element that was removed.

oldLogicalIndex

int

The old logical index of the child element.

OnPropertyChanged(string)

Called when a property value changes.

Declaration

cs-api-definition
protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName

string

The name of the property that changed.

ScrollIntoView(Rect)

Scrolls the control, so that the Rect parameter appears into the viewport. Zoom is performed if necessary. No change is performed if the Rect parameter is already into view.

Declaration

cs-api-definition
public void ScrollIntoView(Rect rect)

Parameters

rect

Rect

The Rect to scroll to.

ScrollIntoView(TextRange)

Scrolls the control, so that the TextRange parameter appears into the viewport. Zoom is performed if necessary. No change is performed if the TextRange parameter is already into view.

Declaration

cs-api-definition
public void ScrollIntoView(TextRange range)

Parameters

range

TextRange

The TextRange to scroll to.

ZoomToLevel(double)

Zooms the document to the specified zoom level.

Declaration

cs-api-definition
public void ZoomToLevel(double zoomLevel)

Parameters

zoomLevel

double

The zoom level to apply.

Events

LinkAnnotationTapped

Occurs when a link annotation is tapped within the PDF document.

Declaration

cs-api-definition
public event EventHandler<LinkAnnotationTappedEventArgs> LinkAnnotationTapped

Event Value

EventHandler<LinkAnnotationTappedEventArgs>

PageElementsLoaded

An event that is raised after the model elements of a page were loaded. Use this event to alter the page content before it is rendered. This event is raised on a background thread.

Declaration

cs-api-definition
public event EventHandler<PageElementsLoadedEventArgs> PageElementsLoaded

Event Value

EventHandler<PageElementsLoadedEventArgs>

SourceException

Occurs when an exception is raised during document loading or processing.

Declaration

cs-api-definition
public event EventHandler<SourceExceptionEventArgs> SourceException

Event Value

EventHandler<SourceExceptionEventArgs>

SourcePasswordNeeded

An event that is raised during document import if a password is needed. This event may be raised on a non-UI thread. The password can be provided in the event args.

Declaration

cs-api-definition
public event EventHandler<PasswordNeededEventArgs> SourcePasswordNeeded

Event Value

EventHandler<PasswordNeededEventArgs>

In this article
DefinitionConstructorsRadPdfViewer()FieldsBackgroundColorPropertyBusyIndicatorTemplatePropertyCloseSearchViewCommandPropertyDocumentPropertyDoubleTappedCommandPropertyFitToWidthCommandPropertyLayoutModePropertyMaxZoomLevelPropertyMinZoomLevelPropertyNavigateToNextPageCommandPropertyNavigateToNextSearchResultCommandPropertyNavigateToPageCommandPropertyNavigateToPreviousPageCommandPropertyNavigateToPreviousSearchResultCommandPropertyOpenSearchViewCommandPropertyPageSpacingPropertySearchSettingsPropertySelectionSettingsPropertySourceExceptionTemplatePropertySourcePropertyToggleLayoutModeCommandPropertyViewportPropertyVisiblePagesCountPropertyVisiblePagesStartIndexPropertyZoomInCommandPropertyZoomLevelPropertyZoomOutCommandPropertyPropertiesBackgroundColorBusyIndicatorTemplateCloseSearchViewCommandDocumentDoubleTappedCommandEnableHardwareAccelerationFitToWidthCommandLayoutModeMaxZoomLevelMinZoomLevelNavigateToNextPageCommandNavigateToNextSearchResultCommandNavigateToPageCommandNavigateToPreviousPageCommandNavigateToPreviousSearchResultCommandOpenSearchViewCommandPageSpacingSearchContentViewSearchSettingsSelectionSettingsSourceSourceExceptionTemplateToggleLayoutModeCommandViewportVisiblePagesCountVisiblePagesStartIndexZoomInCommandZoomLevelZoomOutCommandMethodsChangeViewport(Rect)NavigateToPage(int)OnChildAdded(Element)OnChildRemoved(Element, int)OnPropertyChanged(string)ScrollIntoView(Rect)ScrollIntoView(TextRange)ZoomToLevel(double)EventsLinkAnnotationTappedPageElementsLoadedSourceExceptionSourcePasswordNeeded
Not finding the help you need?
Contact Support