New to Telerik UI for WinFormsStart a free 30-day trial

Represents a control that can display and interact with PDF documents within your application. The RadPdfViewer provides comprehensive PDF viewing capabilities including zooming, scrolling, panning, and text search functionality. The control features a virtualized rendering engine to ensure optimal performance with large documents. It can be seamlessly integrated with a RadPdfViewerNavigator control to provide additional navigation features such as page thumbnails, bookmarks, and quick page selection.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.PdfViewer.dll

Syntax:

C#
[TelerikToolboxCategory("PdfViewer")]
[Docking(DockingBehavior.Ask)]
public class RadPdfViewer : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IPrintable

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadPdfViewer...

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedIPrintableISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window...

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Dispose(bool)RadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnGotFocus(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.GetInputElement()RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGestureScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.AdjustFormScrollbars(bool)ScrollableControl.GetScrollState(int)ScrollableControl.OnPaintBackground(PaintEventArgs)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.CreateParamsScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateAccessibilityInstance()Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.Hide()Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnTextChanged(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.OnEnter(EventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnMarginChanged(EventArgs)Control.OnMouseDoubleClick(MouseEventArgs)Control.OnMouseClick(MouseEventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessDialogChar(char)Control.ProcessDialogKey(Keys)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.Select(bool, bool)Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.Show()Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BindingContextControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ContextMenuStripControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontHeightControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.NameControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.CanEnableImeControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.TextChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ResizeControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.ToString()Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)...

Constructors

Creates a RadPdfViewer control.

C#
public RadPdfViewer()

Properties

Gets or sets the background color of the annotations when they are pressed.

C#
[Browsable(true)]
public Color AnnotationsColor { get; set; }

Gets the RadPdfViewerContainer which represents the elements container of the control.

C#
[Browsable(false)]
public RadPdfViewerContainer ContainerElement { get; }
C#
protected override Size DefaultSize { get; }

Overrides: Control.DefaultSize

Gets or Sets the currently loaded RadFixedDocument

C#
[Browsable(false)]
public RadFixedDocument Document { get; set; }

Enables or disables the AI Summary feature.

C#
[Browsable(true)]
public bool EnableAISummary { get; set; }
Remarks:

When set to true the SummaryProvider must be assigned to generate summaries and answer questions.

Gets or sets whether the thumbnail element is visible.

C#
[Browsable(true)]
public bool EnableThumbnails { get; set; }

Gets or sets whether a complete page should be fitted within the viewer control. When enabled, the zoom level automatically adjusts to display an entire page.

C#
public bool FitFullPage { get; set; }

Gets or sets whether the document should be scaled to fit the width of the viewer control. When enabled, the zoom level automatically adjusts when the control is resized.

C#
public bool FitToWidth { get; set; }

Gets or sets the display state of the horizontal scrollbar.

C#
public ScrollState HorizontalScrollState { get; set; }

Gets the RadPdfViewerElement which represents the main element of the control.

C#
[Browsable(false)]
public RadPdfViewerElement PdfViewerElement { get; }

Set or get the page orientation when printing.

C#
[Browsable(true)]
public PrintOrientation PrintOrientation { get; set; }

Scale page when printing to fit the paper size without keeping the aspect ratio.

C#
[Browsable(false)]
public bool PrintScalePageToPaperSize { get; set; }

Gets or sets the associated RadContextMenu. By default this is PdfViewerContextMenu.

C#
[Browsable(false)]
public RadContextMenu RadContextMenu { get; set; }

Gets or sets whether the entire document is loaded at the beginning or pages are loaded on demand.

C#
[Browsable(true)]
public ReadingMode ReadingMode { get; set; }

Gets or sets the rotation angle applied to all pages in the document.

C#
public RotationAngle RotationAngle { get; set; }

Gets or sets the factor by which the document is scaled.

C#
[Browsable(true)]
public float ScaleFactor { get; set; }

Gets or sets the color that highlights the current selection.

C#
[Browsable(true)]
public Color SelectionColor { get; set; }

Get or Set the width of the Thumbnail list

C#
public int ThumbnailListWidth { get; set; }
C#
public float ThumbnailsScaleFactor { get; set; }

if true, the page will be printed in an image that will be send to the printer at once. Loss of quality is possible.

C#
public bool UseBufferedPrinting { get; set; }

Gets or sets the display state of the vertical scrollbar.

C#
public ScrollState VerticalScrollState { get; set; }

Gets or sets the current viewer mode - Pan, TextSelection or None.

C#
[Browsable(true)]
public FixedDocumentViewerMode ViewerMode { get; set; }

Methods

Creates the child elements of the RadPdfViewer control.

C#
protected override void CreateChildItems(RadElement parent)
Parameters:parentRadElement

The parent element to which child elements will be added.

Overrides: RadControl.CreateChildItems(RadElement)

Creates the container element that hosts the PDF viewer element.

C#
protected virtual RadPdfViewerContainer CreateContainerElement(RadPdfViewerElement ownerElement)
Parameters:ownerElementRadPdfViewerElement

The PDF viewer element that will be contained.

Returns:

RadPdfViewerContainer

A new instance of RadPdfViewerContainer.

Creates the PDF viewer element used for document visualization.

C#
protected virtual RadPdfViewerElement CreateViewerElement()
Returns:

RadPdfViewerElement

A new instance of RadPdfViewerElement.

Exports a single PDF page to a Bitmap object.

C#
public Bitmap ExportPage(int pageNumber, double aspectRatio, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)
Parameters:pageNumberint

Number of the page to export. First page has a number 1. A value of 0 means export the current page.

aspectRatiodouble

Scale factor for the exported image. Value of 1.0 represents the original size.

overrideFileIfAlreadyExistbool

When true, overrides the image file if it already exists.

imageFormatImageFormat

The image format to use when creating the bitmap.

Returns:

Bitmap

Returns a Bitmap object representing the PDF page. This bitmap should be disposed manually when no longer needed.

Exports a single PDF page to an image file on the disk.

C#
public bool ExportPage(int pageNumber, string fileName, double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)
Parameters:pageNumberint

Number of the page to export. First page has a number 1. A value of 0 means export the current page.

fileNamestring

Full path to the output image file.

scaleSizedouble

Scale factor for the exported image. Value of 1.0 represents the original size.

overrideFileIfAlreadyExistbool

When true, overrides the image file if it already exists.

imageFormatImageFormat

The image format to use when saving the image.

Returns:

bool

Returns true if the export was successful, false if the file already exists and overrideFileIfAlreadyExist is false.

Exports all PDF pages to a collection of Bitmap objects.

C#
public IEnumerable<Bitmap> ExportPages(double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)
Parameters:scaleSizedouble

Scale factor for the exported images. Value of 1.0 represents the original size.

overrideFileIfAlreadyExistbool

When true, overrides existing files if encountered during the operation.

imageFormatImageFormat

The image format to use when creating the bitmaps.

Returns:

IEnumerable<Bitmap>

Returns a collection of Bitmap objects, one for each page in the document. These Bitmaps should be disposed manually when no longer needed.

Exports all PDF pages to image files on the disk with sequential numbering.

C#
public bool ExportPages(string fileName, double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)
Parameters:fileNamestring

Base name for the output image files. Page numbers will be appended automatically.

scaleSizedouble

Scale factor for the exported images. Value of 1.0 represents the original size.

overrideFileIfAlreadyExistbool

When true, overrides the image files if they already exist.

imageFormatImageFormat

The image format to use when saving the images.

Returns:

bool

Returns true if all exports were successful, false if any file already existed and overrideFileIfAlreadyExist is false.

Finds the specified text in the current document using specified search options and starting from a specific position. The search begins from the provided position and moves forward through the document.

C#
public SearchResult Find(string text, TextSearchOptions options, TextPosition startPosition)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

startPositionTextPosition

The text position from which to begin searching.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the specified text within a specific range of the current document using specified search options. The search is limited to the text content within the provided range boundaries.

C#
public SearchResult Find(string text, TextSearchOptions options, TextRange range)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

rangeTextRange

The text range within which to limit the search operation.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the specified text in the current document using specified search options.

C#
public SearchResult Find(string text, TextSearchOptions options)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the specified text in the current document using default search options.

C#
public SearchResult Find(string text)
Parameters:textstring

The text to search for in the document.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds all occurrences of the specified text in the current document using specified search options and starting from a specific position. Returns all matching results found from the start position to the end of the document.

C#
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextPosition startPosition)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

startPositionTextPosition

The text position from which to begin searching.

Returns:

IEnumerable<SearchResult>

An enumerable collection of SearchResult objects representing all found occurrences of the text from the start position.

Finds all occurrences of the specified text within a specific range of the current document using specified search options. Returns all matching results found within the boundaries of the provided text range.

C#
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextRange range)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

rangeTextRange

The text range within which to limit the search operation.

Returns:

IEnumerable<SearchResult>

An enumerable collection of SearchResult objects representing all found occurrences of the text within the specified range.

Finds all occurrences of the specified text in the current document using specified search options. Returns all matching results found throughout the entire document based on the provided search criteria.

C#
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

Returns:

IEnumerable<SearchResult>

An enumerable collection of SearchResult objects representing all found occurrences of the text.

Finds all occurrences of the specified text in the current document using default search options. Returns all matching results found throughout the entire document.

C#
public IEnumerable<SearchResult> FindAll(string text)
Parameters:textstring

The text to search for in the document.

Returns:

IEnumerable<SearchResult>

An enumerable collection of SearchResult objects representing all found occurrences of the text.

Finds the previous occurrence of the specified text in the current document using specified search options and starting from a specific position. The search begins from the provided position and moves backward through the document.

C#
public SearchResult FindPrevious(string text, TextSearchOptions options, TextPosition startPosition)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

startPositionTextPosition

The text position from which to begin searching backward.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the previous occurrence of the specified text within a specific range of the current document using specified search options. The search moves backward through the text content within the provided range boundaries.

C#
public SearchResult FindPrevious(string text, TextSearchOptions options, TextRange range)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

rangeTextRange

The text range within which to limit the search operation.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the previous occurrence of the specified text in the current document using specified search options. The search begins from the current selection or position and moves backward through the document.

C#
public SearchResult FindPrevious(string text, TextSearchOptions options)
Parameters:textstring

The text to search for in the document.

optionsTextSearchOptions

The search options that control case sensitivity, whole word matching, and other search parameters.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Finds the previous occurrence of the specified text in the current document using default search options. The search begins from the current selection or position and moves backward through the document.

C#
public SearchResult FindPrevious(string text)
Parameters:textstring

The text to search for in the document.

Returns:

SearchResult

A SearchResult object containing information about the found text position or SearchResult.NotFound if the text was not found.

Gets the bookmark nearest to the current viewing position in the document.

C#
public BookmarkItem GetCurrentBookmark()
Returns:

BookmarkItem

The BookmarkItem representing the nearest bookmark to the current position.

Gets the currently loaded PDF document as a stream.

C#
public Stream GetDocumentAsStream()
Returns:

Stream

A stream containing the PDF document data.

Hides the AI summary chat in the viewer.

C#
public void HideAISummary()

Hides the PDF document's bookmarks panel in the viewer.

C#
public void HideBookmarks()

Hides the PDF document's signature panel in the viewer.

C#
public void HideSignaturePanel()

Hide the Pdf document's thumbnails

C#
public void HideThumbnails()

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

C#
protected override bool IsInputKey(Keys keyData)
Parameters:keyDataKeys

One of the Keys values.

Returns:

bool

True if the specified key is a regular input key; otherwise, false.

Overrides: RadControl.IsInputKey(Keys)

Loads a PDF document from a specified stream.

C#
public void LoadDocument(Stream stream)
Parameters:streamStream

The stream of PDF data.

Loads a PDF document from a specified file name.

C#
public void LoadDocument(string path)
Parameters:pathstring

The path of the PDF file.

Raises the CaptureLosing event. Handles cases when the control loses capture.

C#
protected override void OnCaptureLosing()

Overrides: RadControl.OnCaptureLosing()

Raises the KeyDown event. Handles keyboard input in the PDF viewer.

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

A KeyEventArgs that contains the event data.

Overrides: RadControl.OnKeyDown(KeyEventArgs)

Notifies that the control is about to be visualized.

C#
protected override void OnLoad(Size desiredSize)
Parameters:desiredSizeSize

Overrides: RadControl.OnLoad(Size)

Raises the MouseDown event. Handles mouse button presses over the PDF viewer.

C#
protected override void OnMouseDown(MouseEventArgs e)
Parameters:eMouseEventArgs

A MouseEventArgs that contains the event data.

Overrides: RadControl.OnMouseDown(MouseEventArgs)

Raises the MouseMove event. Handles mouse movement over the PDF viewer.

C#
protected override void OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

A MouseEventArgs that contains the event data.

Overrides: RadControl.OnMouseMove(MouseEventArgs)

Raises the MouseUp event. Handles mouse button releases over the PDF viewer.

C#
protected override void OnMouseUp(MouseEventArgs e)
Parameters:eMouseEventArgs

A MouseEventArgs that contains the event data.

Overrides: RadControl.OnMouseUp(MouseEventArgs)

C#
protected override void OnMouseWheel(MouseEventArgs e)
Parameters:eMouseEventArgs

Overrides: RadControl.OnMouseWheel(MouseEventArgs)

C#
protected override void OnThemeChanged()

Overrides: RadControl.OnThemeChanged()

Navigates to the next page.

C#
public void PageDown()

Navigates to the previous page.

C#
public void PageUp()

Directly prints the RadPdfViewer to the default printer.

C#
public virtual void Print()

Directly prints the RadPdfViewer to the default printer or shows printer settings and then prints the RadPdfViewer.

C#
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)
Parameters:showPrinterSettingsbool

Indicates whether printer settings dialog should be shown.

documentRadPrintDocument

As instance of RadPrintDocument used to control the print process.

Directly prints the RadPdfViewer to the default printer or shows printer settings and then prints the RadPdfViewer.

C#
public virtual void Print(bool showPrinterSettings)
Parameters:showPrinterSettingsbool

Indicates whether printer settings dialog should be shown.

Shows a RadPrintPreviewDialog for editing the RadPdfViewer print settings.

C#
public virtual void PrintPreview()

Shows a RadPrintPreviewDialog for editing the RadPdfViewer print settings.

C#
public virtual void PrintPreview(RadPrintDocument document)
Parameters:documentRadPrintDocument

As instance of RadPrintDocument used to control the print process.

Processes a command key. Handles Tab and Shift+Tab for navigating between form fields in the PDF document.

C#
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters:msgMessage

A Message, passed by reference, that represents the Win32 message to process.

keyDataKeys

One of the Keys values that represents the key to process.

Returns:

bool

True if the character was processed by the control; otherwise, false.

Overrides: Control.ProcessCmdKey(ref Message, Keys)

Rotates all pages in the document to the specified angle.

C#
public virtual void Rotate(RotationAngle angle)
Parameters:angleRotationAngle

The rotation angle to apply to all pages.

Saves the currently loaded PDF document to a stream.

C#
public bool SaveDocument(Stream outputStream)
Parameters:outputStreamStream

The stream to save the document to.

Returns:

bool

True if the save operation was successful; otherwise, false.

Saves the currently loaded PDF document to a file.

C#
public bool SaveDocument(string fileName)
Parameters:fileNamestring

The full path and name of the file to save to.

Returns:

bool

True if the save operation was successful; otherwise, false.

Scales the control and its contents according to the specified scaling factor.

C#
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters:factorSizeF

The factor by which to scale the control.

specifiedBoundsSpecified

A bitwise combination of BoundsSpecified values.

Overrides: RadControl.ScaleControl(SizeF, BoundsSpecified)

Creates selection from start position to end position.

C#
public void Select(SearchResult result)
Parameters:resultSearchResult

The result from search.

Show the AI summary chat for the PDF document

C#
public void ShowAISummary()

Show the Pdf document's bookmarks

C#
public void ShowBookmarks()

Shows the PDF document's signature panel, allowing users to view and interact with digital signatures.

C#
public void ShowSignaturePanel()

Show the Pdf document's thumbnails

C#
public void ShowThumbnails()

Sync the nearest bookmark from the Pdf document's to the tree

C#
public void SyncCurrentBookmark()

Unload the current PDF document.

C#
public void UnloadDocument()

Events

AnnotationClicked

EventHandler<AnnotationEventArgs>

Fires when a link or a bookmark was clicked.

C#
public event EventHandler<AnnotationEventArgs> AnnotationClicked

Fires when the caret changes its position.

C#
public event EventHandler CaretPositionChanged

Fires after the current RadFixedPage has been changed.

C#
public event CurrentPageChangedEventHandler CurrentPageChanged

Fires when an internal exception in during loading parts of the document occurs. If the event is not handled, a default error message box will be shown, otherwise the message box will not show and handling the error should be done in the event handler.

C#
public event PdfExceptionEventHandler DataError

Fires when the document has finished loading.

C#
public event EventHandler DocumentLoaded

Fires when the FitFullPage property has changed.

C#
public event EventHandler FitFullPageChanged

Fires when the FitToWidth property has changed.

C#
public event EventHandler FitToWidthChanged

HyperlinkClicked

EventHandler<HyperlinkClickedEventArgs>

Occurs when the hyperlink is clicked.

C#
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked

Fires when a RadFixedPageElement is being created. Allows for replacing it with custom page element.

C#
public event RadFixedPageElementEventHandler PageElementCreating

Fires when a RadFixedPageElement has been asynchronously rendered.

C#
public event EventHandler PageRenderCompleted

Fires when a RadFixedPageElement is about to be asynchronously rendered.

C#
public event EventHandler PageRenderStarted

Fires when SignaturePanel hides or shows

C#
public event EventHandler PdfSignaturePanelVisibilityChanged

Fires when the ScaleFactor property has changed.

C#
public event EventHandler ScaleFactorChanged

Fires when the text selection has changed.

C#
public event EventHandler SelectionChanged

Fires when the ViewerMode property has changed.

C#
public event EventHandler ViewerModeChanged
In this article
DefinitionConstructorsRadPdfViewer()PropertiesAnnotationsColorContainerElementDefaultSizeDocumentEnableAISummaryEnableThumbnailsFitFullPageFitToWidthHorizontalScrollStatePdfViewerElementPrintOrientationPrintScalePageToPaperSizeRadContextMenuReadingModeRotationAngleScaleFactorSelectionColorThumbnailListWidthThumbnailsScaleFactorUseBufferedPrintingVerticalScrollStateViewerModeMethodsCreateChildItems(RadElement)CreateContainerElement(RadPdfViewerElement)CreateViewerElement()ExportPage(int, double, bool, ImageFormat)ExportPage(int, string, double, bool, ImageFormat)ExportPages(double, bool, ImageFormat)ExportPages(string, double, bool, ImageFormat)Find(string, TextSearchOptions, TextPosition)Find(string, TextSearchOptions, TextRange)Find(string, TextSearchOptions)Find(string)FindAll(string, TextSearchOptions, TextPosition)FindAll(string, TextSearchOptions, TextRange)FindAll(string, TextSearchOptions)FindAll(string)FindPrevious(string, TextSearchOptions, TextPosition)FindPrevious(string, TextSearchOptions, TextRange)FindPrevious(string, TextSearchOptions)FindPrevious(string)GetCurrentBookmark()GetDocumentAsStream()HideAISummary()HideBookmarks()HideSignaturePanel()HideThumbnails()IsInputKey(Keys)LoadDocument(Stream)LoadDocument(string)OnCaptureLosing()OnKeyDown(KeyEventArgs)OnLoad(Size)OnMouseDown(MouseEventArgs)OnMouseMove(MouseEventArgs)OnMouseUp(MouseEventArgs)OnMouseWheel(MouseEventArgs)OnThemeChanged()PageDown()PageUp()Print()Print(bool, RadPrintDocument)Print(bool)PrintPreview()PrintPreview(RadPrintDocument)ProcessCmdKey(ref Message, Keys)Rotate(RotationAngle)SaveDocument(Stream)SaveDocument(string)ScaleControl(SizeF, BoundsSpecified)Select(SearchResult)ShowAISummary()ShowBookmarks()ShowSignaturePanel()ShowThumbnails()SyncCurrentBookmark()UnloadDocument()EventsAnnotationClickedCaretPositionChangedCurrentPageChangedDataErrorDocumentLoadedFitFullPageChangedFitToWidthChangedHyperlinkClickedPageElementCreatingPageRenderCompletedPageRenderStartedPdfSignaturePanelVisibilityChangedScaleFactorChangedSelectionChangedViewerModeChanged
Not finding the help you need?
Contact Support