New to Telerik UI for .NET MAUI? Start a free 30-day trial

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.

The RadPdfViewer is designed to handle PDF documents efficiently while providing a complete set of features for document viewing, navigation, and user interaction. It supports various document sources and offers flexible layout modes and viewing options for different application requirements.

Core Features:

  • Document Loading: Support for multiple document sources including files, streams, and URIs
  • Layout Modes: Single page and continuous scroll viewing modes with optimal performance
  • Navigation: Built-in page navigation with programmatic and user-driven controls
  • Zoom Controls: Comprehensive zooming capabilities with fit-to-width and custom zoom levels
  • Interactive Elements: Support for hyperlinks, annotations, and interactive PDF content

Text Operations:

  • Text Selection: Advanced text selection with customizable appearance and behavior
  • Text Search: Full-text search with highlighting and navigation between results
  • Copy Operations: Extract and copy selected text to clipboard
  • Selection Menu: Contextual menu for text operations with extensible commands

User Interface:

  • Viewport Management: Precise viewport control with programmatic scrolling and positioning
  • Touch Gestures: Native touch support for panning, zooming, and text selection
  • Command Architecture: Extensive built-in commands for all major operations
  • Event Model: Comprehensive event system for monitoring and customizing behavior

Customization and Integration:

  • Appearance Options: Customizable background colors, page spacing, and visual presentation
  • Templates: Custom templates for busy indicators and error states
  • Hardware Acceleration: Optional GPU rendering for enhanced performance
  • Toolbar Integration: Seamless integration with RadPdfViewerToolbar for complete UI solutions

Ideal for document management applications, digital publishing platforms, report viewers, and any scenario requiring professional PDF viewing capabilities. The control provides enterprise-grade functionality while maintaining ease of use and integration flexibility.

Dedicated controls: RadPdfViewerToolbar.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RadPdfViewer : RadLayout

Inheritance: objectRadLayoutRadPdfViewer

Inherited Members RadLayout.CreateLayoutManager()

Constructors

Initializes a new instance of the RadPdfViewer class.

C#
public RadPdfViewer()

Fields

BackgroundColorProperty

BindableProperty

Identifies the BackgroundColor property.

C#
public static readonly BindableProperty BackgroundColorProperty

Identifies the BusyIndicatorTemplate property.

C#
public static readonly BindableProperty BusyIndicatorTemplateProperty

Identifies the CloseSearchViewCommand property.

C#
public static readonly BindableProperty CloseSearchViewCommandProperty

DocumentProperty

BindableProperty

Identifies the Document property.

C#
public static readonly BindableProperty DocumentProperty

Identifies the DoubleTappedCommand property.

C#
public static readonly BindableProperty DoubleTappedCommandProperty

Identifies the FitToWidthCommand property.

C#
public static readonly BindableProperty FitToWidthCommandProperty

LayoutModeProperty

BindableProperty

Identifies the LayoutMode property.

C#
public static readonly BindableProperty LayoutModeProperty

MaxZoomLevelProperty

BindableProperty

Identifies the MaxZoomLevel property.

C#
public static readonly BindableProperty MaxZoomLevelProperty

MinZoomLevelProperty

BindableProperty

Identifies the MinZoomLevel property.

C#
public static readonly BindableProperty MinZoomLevelProperty

Identifies the NavigateToNextPageCommand property.

C#
public static readonly BindableProperty NavigateToNextPageCommandProperty

Identifies the NavigateToNextSearchResultCommand property.

C#
public static readonly BindableProperty NavigateToNextSearchResultCommandProperty

Identifies the NavigateToPageCommand property.

C#
public static readonly BindableProperty NavigateToPageCommandProperty

Identifies the NavigateToPreviousPageCommand property.

C#
public static readonly BindableProperty NavigateToPreviousPageCommandProperty

Identifies the NavigateToPreviousSearchResultCommand property.

C#
public static readonly BindableProperty NavigateToPreviousSearchResultCommandProperty

Identifies the OpenSearchViewCommand property.

C#
public static readonly BindableProperty OpenSearchViewCommandProperty

PageSpacingProperty

BindableProperty

Identifies the PageSpacing property.

C#
public static readonly BindableProperty PageSpacingProperty

SearchSettingsProperty

BindableProperty

Identifies the SearchSettings property.

C#
public static readonly BindableProperty SearchSettingsProperty

Identifies the SelectionSettings property.

C#
public static readonly BindableProperty SelectionSettingsProperty

Identifies the SourceExceptionTemplate property.

C#
public static readonly BindableProperty SourceExceptionTemplateProperty

SourceProperty

BindableProperty

Identifies the Source property.

C#
public static readonly BindableProperty SourceProperty

Identifies the ToggleLayoutModeCommand property.

C#
public static readonly BindableProperty ToggleLayoutModeCommandProperty

ViewportProperty

BindableProperty

Identifies the Viewport property.

C#
public static readonly BindableProperty ViewportProperty

Identifies the VisiblePagesCount property.

C#
public static readonly BindableProperty VisiblePagesCountProperty

Identifies the VisiblePagesStartIndex property.

C#
public static readonly BindableProperty VisiblePagesStartIndexProperty

ZoomInCommandProperty

BindableProperty

Identifies the ZoomInCommand property.

C#
public static readonly BindableProperty ZoomInCommandProperty

ZoomLevelProperty

BindableProperty

Identifies the ZoomLevel property.

C#
public static readonly BindableProperty ZoomLevelProperty

ZoomOutCommandProperty

BindableProperty

Identifies the ZoomOutCommand property.

C#
public static readonly BindableProperty ZoomOutCommandProperty

Properties

Gets or sets the background color of the PDF viewer.

C#
public Color BackgroundColor { get; set; }

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

C#
public DataTemplate BusyIndicatorTemplate { get; set; }

Gets or sets the ICommand which closes the PdfViewerSearchContentView.

C#
public ICommand CloseSearchViewCommand { get; set; }

Document

RadFixedDocument

Gets the currently loaded PDF document.

C#
public RadFixedDocument Document { get; }

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.

C#
public ICommand DoubleTappedCommand { get; set; }

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.

C#
public bool EnableHardwareAcceleration { get; set; }

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

C#
public ICommand FitToWidthCommand { get; set; }

Gets or sets the layout mode for displaying PDF pages.

C#
public LayoutMode LayoutMode { get; set; }

Gets or sets the maximum zoom level allowed.

C#
public double MaxZoomLevel { get; set; }

Gets or sets the minimum zoom level allowed.

C#
public double MinZoomLevel { get; set; }

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

C#
public ICommand NavigateToNextPageCommand { get; set; }

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

C#
public ICommand NavigateToNextSearchResultCommand { get; }

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.

C#
public ICommand NavigateToPageCommand { get; set; }

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

C#
public ICommand NavigateToPreviousPageCommand { get; set; }

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

C#
public ICommand NavigateToPreviousSearchResultCommand { get; }

Gets or sets the ICommand which opens the PdfViewerSearchContentView.

C#
public ICommand OpenSearchViewCommand { get; set; }

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

C#
public double PageSpacing { get; set; }

Gets the search content view for the PDF viewer.

C#
public PdfViewerSearchContentView SearchContentView { get; }

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

C#
public PdfViewerSearchSettings SearchSettings { get; set; }

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

C#
public PdfViewerSelectionSettings SelectionSettings { get; set; }

Gets or sets the document source for the PDF viewer.

C#
public DocumentSource Source { get; set; }

Gets or sets the template for displaying source exceptions.

C#
public DataTemplate SourceExceptionTemplate { get; set; }

Gets or sets the command to toggle the layout mode.

C#
public ICommand ToggleLayoutModeCommand { get; set; }

Gets the current viewport rectangle of the document.

C#
public Rect Viewport { get; }

Gets the number of visible pages.

C#
public int VisiblePagesCount { get; }

Gets the index of the first visible page.

C#
public int VisiblePagesStartIndex { get; }

Gets or sets the command to zoom in the document.

C#
public ICommand ZoomInCommand { get; set; }

Gets the current zoom level of the document.

C#
public double ZoomLevel { get; }

Gets or sets the command to zoom out the document.

C#
public ICommand ZoomOutCommand { get; set; }

Methods

Changes the Viewport property to the desired value.

C#
public void ChangeViewport(Rect viewport)
Parameters:viewportRect

The new value of the Viewport property.

Navigates to the specified page index.

C#
public void NavigateToPage(int index)
Parameters:indexint

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

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

C#
protected override void OnChildAdded(Element child)
Parameters:childElement

The child element that was added.

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

C#
protected override void OnChildRemoved(Element child, int oldLogicalIndex)
Parameters:childElement

The child element that was removed.

oldLogicalIndexint

The old logical index of the child element.

Called when a property value changes.

C#
protected override void OnPropertyChanged(string propertyName = null)
Parameters:propertyNamestring

The name of the property that changed.

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.

C#
public void ScrollIntoView(Rect rect)
Parameters:rectRect

The Rect to scroll to.

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.

C#
public void ScrollIntoView(TextRange range)
Parameters:rangeTextRange

The TextRange to scroll to.

Zooms the document to the specified zoom level.

C#
public void ZoomToLevel(double zoomLevel)
Parameters:zoomLeveldouble

The zoom level to apply.

Events

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

C#
public event EventHandler<LinkAnnotationTappedEventArgs> LinkAnnotationTapped

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.

C#
public event EventHandler<PageElementsLoadedEventArgs> PageElementsLoaded

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

C#
public event EventHandler<SourceExceptionEventArgs> SourceException

SourcePasswordNeeded

EventHandler<PasswordNeededEventArgs>

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.

C#
public event EventHandler<PasswordNeededEventArgs> SourcePasswordNeeded
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