Class
RadPdfViewer

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:

cs-api-definition
[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

RadPdfViewer()

Creates a RadPdfViewer control.

Declaration

cs-api-definition
public RadPdfViewer()

Properties

AnnotationsColor

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

Declaration

cs-api-definition
[Browsable(true)]
public Color AnnotationsColor { get; set; }

Property Value

Color

ContainerElement

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

Declaration

cs-api-definition
[Browsable(false)]
public RadPdfViewerContainer ContainerElement { get; }

Property Value

RadPdfViewerContainer

DefaultSize

Declaration

cs-api-definition
protected override Size DefaultSize { get; }

Property Value

Size

Overrides Control.DefaultSize

Document

Gets or Sets the currently loaded RadFixedDocument

Declaration

cs-api-definition
[Browsable(false)]
public RadFixedDocument Document { get; set; }

Property Value

RadFixedDocument

EnableAISummary

Enables or disables the AI Summary feature.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableAISummary { get; set; }

Property Value

bool

Remarks

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

EnableThumbnails

Gets or sets whether the thumbnail element is visible.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableThumbnails { get; set; }

Property Value

bool

FitFullPage

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.

Declaration

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

Property Value

bool

FitToWidth

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.

Declaration

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

Property Value

bool

HorizontalScrollState

Gets or sets the display state of the horizontal scrollbar.

Declaration

cs-api-definition
public ScrollState HorizontalScrollState { get; set; }

Property Value

ScrollState

PdfViewerElement

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

Declaration

cs-api-definition
[Browsable(false)]
public RadPdfViewerElement PdfViewerElement { get; }

Property Value

RadPdfViewerElement

PrintOrientation

Set or get the page orientation when printing.

Declaration

cs-api-definition
[Browsable(true)]
public PrintOrientation PrintOrientation { get; set; }

Property Value

PrintOrientation

PrintScalePageToPaperSize

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

Declaration

cs-api-definition
[Browsable(false)]
public bool PrintScalePageToPaperSize { get; set; }

Property Value

bool

RadContextMenu

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

Declaration

cs-api-definition
[Browsable(false)]
public RadContextMenu RadContextMenu { get; set; }

Property Value

RadContextMenu

ReadingMode

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

Declaration

cs-api-definition
[Browsable(true)]
public ReadingMode ReadingMode { get; set; }

Property Value

ReadingMode

RotationAngle

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

Declaration

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

Property Value

RotationAngle

ScaleFactor

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

Declaration

cs-api-definition
[Browsable(true)]
public float ScaleFactor { get; set; }

Property Value

float

SelectionColor

Gets or sets the color that highlights the current selection.

Declaration

cs-api-definition
[Browsable(true)]
public Color SelectionColor { get; set; }

Property Value

Color

ThumbnailListWidth

Get or Set the width of the Thumbnail list

Declaration

cs-api-definition
public int ThumbnailListWidth { get; set; }

Property Value

int

ThumbnailsScaleFactor

Declaration

cs-api-definition
public float ThumbnailsScaleFactor { get; set; }

Property Value

float

UseBufferedPrinting

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

Declaration

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

Property Value

bool

VerticalScrollState

Gets or sets the display state of the vertical scrollbar.

Declaration

cs-api-definition
public ScrollState VerticalScrollState { get; set; }

Property Value

ScrollState

ViewerMode

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

Declaration

cs-api-definition
[Browsable(true)]
public FixedDocumentViewerMode ViewerMode { get; set; }

Property Value

FixedDocumentViewerMode

Methods

CreateChildItems(RadElement)

Creates the child elements of the RadPdfViewer control.

Declaration

cs-api-definition
protected override void CreateChildItems(RadElement parent)

Parameters

parent

RadElement

The parent element to which child elements will be added.

Overrides RadControl.CreateChildItems(RadElement)

CreateContainerElement(RadPdfViewerElement)

Creates the container element that hosts the PDF viewer element.

Declaration

cs-api-definition
protected virtual RadPdfViewerContainer CreateContainerElement(RadPdfViewerElement ownerElement)

Parameters

ownerElement

RadPdfViewerElement

The PDF viewer element that will be contained.

Returns

RadPdfViewerContainer

A new instance of RadPdfViewerContainer.

CreateViewerElement()

Creates the PDF viewer element used for document visualization.

Declaration

cs-api-definition
protected virtual RadPdfViewerElement CreateViewerElement()

Returns

RadPdfViewerElement

A new instance of RadPdfViewerElement.

ExportPage(int, double, bool, ImageFormat)

Exports a single PDF page to a Bitmap object.

Declaration

cs-api-definition
public Bitmap ExportPage(int pageNumber, double aspectRatio, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)

Parameters

pageNumber

int

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

aspectRatio

double

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

overrideFileIfAlreadyExist

bool

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

imageFormat

ImageFormat

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.

ExportPage(int, string, double, bool, ImageFormat)

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

Declaration

cs-api-definition
public bool ExportPage(int pageNumber, string fileName, double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)

Parameters

pageNumber

int

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

fileName

string

Full path to the output image file.

scaleSize

double

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

overrideFileIfAlreadyExist

bool

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

imageFormat

ImageFormat

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.

ExportPages(double, bool, ImageFormat)

Exports all PDF pages to a collection of Bitmap objects.

Declaration

cs-api-definition
public IEnumerable<Bitmap> ExportPages(double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)

Parameters

scaleSize

double

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

overrideFileIfAlreadyExist

bool

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

imageFormat

ImageFormat

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.

ExportPages(string, double, bool, ImageFormat)

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

Declaration

cs-api-definition
public bool ExportPages(string fileName, double scaleSize, bool overrideFileIfAlreadyExist, ImageFormat imageFormat)

Parameters

fileName

string

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

scaleSize

double

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

overrideFileIfAlreadyExist

bool

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

imageFormat

ImageFormat

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.

Find(string)

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

Declaration

cs-api-definition
public SearchResult Find(string text)

Parameters

text

string

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.

Find(string, TextSearchOptions)

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

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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.

Find(string, TextSearchOptions, TextPosition)

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.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

startPosition

TextPosition

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.

Find(string, TextSearchOptions, TextRange)

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.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

range

TextRange

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.

FindAll(string)

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

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text)

Parameters

text

string

The text to search for in the document.

Returns

IEnumerable<SearchResult>

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

FindAll(string, TextSearchOptions)

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.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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.

FindAll(string, TextSearchOptions, TextPosition)

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.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

startPosition

TextPosition

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.

FindAll(string, TextSearchOptions, TextRange)

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.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

range

TextRange

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.

FindPrevious(string)

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.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text)

Parameters

text

string

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.

FindPrevious(string, TextSearchOptions)

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.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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.

FindPrevious(string, TextSearchOptions, TextPosition)

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.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

startPosition

TextPosition

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.

FindPrevious(string, TextSearchOptions, TextRange)

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.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The text to search for in the document.

options

TextSearchOptions

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

range

TextRange

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.

GetCurrentBookmark()

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

Declaration

cs-api-definition
public BookmarkItem GetCurrentBookmark()

Returns

BookmarkItem

The BookmarkItem representing the nearest bookmark to the current position.

GetDocumentAsStream()

Gets the currently loaded PDF document as a stream.

Declaration

cs-api-definition
public Stream GetDocumentAsStream()

Returns

Stream

A stream containing the PDF document data.

HideAISummary()

Hides the AI summary chat in the viewer.

Declaration

cs-api-definition
public void HideAISummary()

HideBookmarks()

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

Declaration

cs-api-definition
public void HideBookmarks()

HideSignaturePanel()

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

Declaration

cs-api-definition
public void HideSignaturePanel()

HideThumbnails()

Hide the Pdf document's thumbnails

Declaration

cs-api-definition
public void HideThumbnails()

IsInputKey(Keys)

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

Declaration

cs-api-definition
protected override bool IsInputKey(Keys keyData)

Parameters

keyData

Keys

One of the Keys values.

Returns

bool

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

Overrides RadControl.IsInputKey(Keys)

LoadDocument(Stream)

Loads a PDF document from a specified stream.

Declaration

cs-api-definition
public void LoadDocument(Stream stream)

Parameters

stream

Stream

The stream of PDF data.

LoadDocument(string)

Loads a PDF document from a specified file name.

Declaration

cs-api-definition
public void LoadDocument(string path)

Parameters

path

string

The path of the PDF file.

OnCaptureLosing()

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

Declaration

cs-api-definition
protected override void OnCaptureLosing()

Overrides RadControl.OnCaptureLosing()

OnKeyDown(KeyEventArgs)

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

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

A KeyEventArgs that contains the event data.

Overrides RadControl.OnKeyDown(KeyEventArgs)

OnLoad(Size)

Notifies that the control is about to be visualized.

Declaration

cs-api-definition
protected override void OnLoad(Size desiredSize)

Parameters

desiredSize

Size

Overrides RadControl.OnLoad(Size)

OnMouseDown(MouseEventArgs)

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

Declaration

cs-api-definition
protected override void OnMouseDown(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseDown(MouseEventArgs)

OnMouseMove(MouseEventArgs)

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

Declaration

cs-api-definition
protected override void OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseMove(MouseEventArgs)

OnMouseUp(MouseEventArgs)

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

Declaration

cs-api-definition
protected override void OnMouseUp(MouseEventArgs e)

Parameters

e

MouseEventArgs

A MouseEventArgs that contains the event data.

Overrides RadControl.OnMouseUp(MouseEventArgs)

OnMouseWheel(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides RadControl.OnMouseWheel(MouseEventArgs)

OnThemeChanged()

Declaration

cs-api-definition
protected override void OnThemeChanged()

Overrides RadControl.OnThemeChanged()

PageDown()

Navigates to the next page.

Declaration

cs-api-definition
public void PageDown()

PageUp()

Navigates to the previous page.

Declaration

cs-api-definition
public void PageUp()

Print()

Directly prints the RadPdfViewer to the default printer.

Declaration

cs-api-definition
public virtual void Print()

Print(bool)

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

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings)

Parameters

showPrinterSettings

bool

Indicates whether printer settings dialog should be shown.

Print(bool, RadPrintDocument)

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

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)

Parameters

showPrinterSettings

bool

Indicates whether printer settings dialog should be shown.

document

RadPrintDocument

As instance of RadPrintDocument used to control the print process.

PrintPreview()

Shows a RadPrintPreviewDialog for editing the RadPdfViewer print settings.

Declaration

cs-api-definition
public virtual void PrintPreview()

PrintPreview(RadPrintDocument)

Shows a RadPrintPreviewDialog for editing the RadPdfViewer print settings.

Declaration

cs-api-definition
public virtual void PrintPreview(RadPrintDocument document)

Parameters

document

RadPrintDocument

As instance of RadPrintDocument used to control the print process.

ProcessCmdKey(ref Message, Keys)

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

Declaration

cs-api-definition
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)

Parameters

msg

Message

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

keyData

Keys

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)

Rotate(RotationAngle)

Rotates all pages in the document to the specified angle.

Declaration

cs-api-definition
public virtual void Rotate(RotationAngle angle)

Parameters

angle

RotationAngle

The rotation angle to apply to all pages.

SaveDocument(Stream)

Saves the currently loaded PDF document to a stream.

Declaration

cs-api-definition
public bool SaveDocument(Stream outputStream)

Parameters

outputStream

Stream

The stream to save the document to.

Returns

bool

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

SaveDocument(string)

Saves the currently loaded PDF document to a file.

Declaration

cs-api-definition
public bool SaveDocument(string fileName)

Parameters

fileName

string

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

Returns

bool

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

ScaleControl(SizeF, BoundsSpecified)

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

Declaration

cs-api-definition
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)

Parameters

factor

SizeF

The factor by which to scale the control.

specified

BoundsSpecified

A bitwise combination of BoundsSpecified values.

Overrides RadControl.ScaleControl(SizeF, BoundsSpecified)

Select(SearchResult)

Creates selection from start position to end position.

Declaration

cs-api-definition
public void Select(SearchResult result)

Parameters

result

SearchResult

The result from search.

ShowAISummary()

Show the AI summary chat for the PDF document

Declaration

cs-api-definition
public void ShowAISummary()

ShowBookmarks()

Show the Pdf document's bookmarks

Declaration

cs-api-definition
public void ShowBookmarks()

ShowSignaturePanel()

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

Declaration

cs-api-definition
public void ShowSignaturePanel()

ShowThumbnails()

Show the Pdf document's thumbnails

Declaration

cs-api-definition
public void ShowThumbnails()

SyncCurrentBookmark()

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

Declaration

cs-api-definition
public void SyncCurrentBookmark()

UnloadDocument()

Unload the current PDF document.

Declaration

cs-api-definition
public void UnloadDocument()

Events

AnnotationClicked

Fires when a link or a bookmark was clicked.

Declaration

cs-api-definition
public event EventHandler<AnnotationEventArgs> AnnotationClicked

Event Value

EventHandler<AnnotationEventArgs>

CaretPositionChanged

Fires when the caret changes its position.

Declaration

cs-api-definition
public event EventHandler CaretPositionChanged

Event Value

EventHandler

CurrentPageChanged

Fires after the current RadFixedPage has been changed.

Declaration

cs-api-definition
public event CurrentPageChangedEventHandler CurrentPageChanged

Event Value

CurrentPageChangedEventHandler

DataError

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.

Declaration

cs-api-definition
public event PdfExceptionEventHandler DataError

Event Value

PdfExceptionEventHandler

DocumentLoaded

Fires when the document has finished loading.

Declaration

cs-api-definition
public event EventHandler DocumentLoaded

Event Value

EventHandler

FitFullPageChanged

Fires when the FitFullPage property has changed.

Declaration

cs-api-definition
public event EventHandler FitFullPageChanged

Event Value

EventHandler

FitToWidthChanged

Fires when the FitToWidth property has changed.

Declaration

cs-api-definition
public event EventHandler FitToWidthChanged

Event Value

EventHandler

HyperlinkClicked

Occurs when the hyperlink is clicked.

Declaration

cs-api-definition
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked

Event Value

EventHandler<HyperlinkClickedEventArgs>

PageElementCreating

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

Declaration

cs-api-definition
public event RadFixedPageElementEventHandler PageElementCreating

Event Value

RadFixedPageElementEventHandler

PageRenderCompleted

Fires when a RadFixedPageElement has been asynchronously rendered.

Declaration

cs-api-definition
public event EventHandler PageRenderCompleted

Event Value

EventHandler

PageRenderStarted

Fires when a RadFixedPageElement is about to be asynchronously rendered.

Declaration

cs-api-definition
public event EventHandler PageRenderStarted

Event Value

EventHandler

PdfSignaturePanelVisibilityChanged

Fires when SignaturePanel hides or shows

Declaration

cs-api-definition
public event EventHandler PdfSignaturePanelVisibilityChanged

Event Value

EventHandler

ScaleFactorChanged

Fires when the ScaleFactor property has changed.

Declaration

cs-api-definition
public event EventHandler ScaleFactorChanged

Event Value

EventHandler

SelectionChanged

Fires when the text selection has changed.

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler

ViewerModeChanged

Fires when the ViewerMode property has changed.

Declaration

cs-api-definition
public event EventHandler ViewerModeChanged

Event Value

EventHandler

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)Find(string, TextSearchOptions)Find(string, TextSearchOptions, TextPosition)Find(string, TextSearchOptions, TextRange)FindAll(string)FindAll(string, TextSearchOptions)FindAll(string, TextSearchOptions, TextPosition)FindAll(string, TextSearchOptions, TextRange)FindPrevious(string)FindPrevious(string, TextSearchOptions)FindPrevious(string, TextSearchOptions, TextPosition)FindPrevious(string, TextSearchOptions, TextRange)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)Print(bool, RadPrintDocument)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