Click or drag to resize

PdfViewer Class

Represents a pdf view control for displaying a Pdf document.
Inheritance Hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              Patagames.Pdf.Net.Controls.WpfPdfViewer

Namespace:  Patagames.Pdf.Net.Controls.Wpf
Assembly:  Patagames.Pdf.Wpf (in Patagames.Pdf.Wpf.dll) Version: 4.57.2704
Syntax
public class PdfViewer : Control, IScrollInfo

The PdfViewer type exposes the following members.

Constructors
  NameDescription
Public methodPdfViewer
Initializes a new instance of the PdfViewer class.
Top
Properties
  NameDescription
Public propertyAllowSetDocument Obsolete.
Gets or sets a value indicating whether the control can accept PDF document through Document property.
Public propertyCanHorizontallyScroll
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Public propertyCanVerticallyScroll
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Public propertyCurrentIndex
Gets or sets the current index of a page in PdfPageCollection
Public propertyCurrentPage
Gets the current PdfPage item by CurrentIndex
Public propertyCurrentPageHighlightColor
Gets or sets the current page highlight color.
Public propertyDocument
Gets or sets the PDF document associated with the current PdfViewer control.
Public propertyExtentHeight
Gets the vertical size of the extent.
Public propertyExtentWidth
Gets the horizontal size of the extent.
Public propertyFillForms
Gets the Forms object associated with the current PdfViewer control.
Public propertyFormHighlightColor
Gets or set the highlight color of the form fields in the document.
Public propertyFormsBlendMode
Gets or sets blend mode which is used in drawing of acro forms.
Public propertyHighlightedTextInfo
Gets information about highlighted text in a PdfView control
Public propertyHorizontalOffset
Gets the horizontal offset of the scrolled content.
Public propertyLoadingIconText
Gets or sets loading icon text in progressive rendering mode
Public propertyMouseMode
Gets or sets mouse mode for PdfViewer control
Public propertyOptimizedLoadThreshold
Gets or sets the threshold value in the number of pages after which the optimized document load is activated.
Public propertyPadding
Gets or sets the padding inside a control.
Public propertyPageAutoDispose
Gets or sets a value indicating whether the PdfViewer will dispose any pages placed outside of its visible boundaries.
Public propertyPageBackColor
Gets or sets the background color for the control under PDF page.
Public propertyPageBorderColor
Gets or sets the border color of the page
Public propertyPageHAlign
Gets or sets the horizontal alignment of page in the control.
Public propertyPageMargin
Specifies space between pages margins
Public propertyPageSeparatorColor
Gets or sets the page separator color.
Public propertyPageVAlign
Gets or sets the vertical alignment of page in the control.
Public propertyRenderFlags
Gets or sets a RenderFlags. None for normal display, or combination of RenderFlags
Public propertyScrollOwner
Gets or sets a ScrollViewer element that controls scrolling behavior.
Public propertySelectedText
Gets selected text from PdfView control
Public propertySelectInfo
Gets information about selected text in a PdfView control
Public propertyShowCurrentPageHighlight
Determines whether the current page's highlight is visible or hidden.
Public propertyShowLoadingIcon
Determines whether the page's loading icon should be shown
Public propertyShowPageSeparator
Determines whether the page separator is visible or hidden
Public propertySizeMode
Control how the PdfViewer will handle pages placement and control sizing
Public propertyTextSelectColor
Gets or sets the selection color of the control.
Public propertyTilesCount
Gets or sets visible page count for tiles view mode
Public propertyUseProgressiveRender
If true the progressive rendering is used for render page
Public propertyVerticalOffset
Gets the vertical offset of the scrolled content.
Public propertyViewMode
Control how the PdfViewer will display pages
Public propertyViewportHeight
Gets the vertical size of the viewport for this content.
Public propertyViewportWidth
Gets the horizontal size of the viewport for this content.
Protected propertyVisualChildrenCount
Gets the number of visual child elements within this element.
(Overrides FrameworkElementVisualChildrenCount.)
Public propertyZoom
This property allows you to scale the PDF page. To take effect the SizeMode property should be Zoom
Top
Methods
  NameDescription
Public methodCalcActualRect
Calculates the actual rectangle of the specified page in client coordinates
Public methodClearRenderBuffer
Clear internal render buffer for rerender pages in Progressive mode
Public methodClientToPage
Computes the location of the specified client point into page coordinates.
Public methodCloseDocument
Close a loaded PDF document.
Public methodDeselectText
Clear text selection
Protected methodDrawCurrentPageHighlight
Draws current page highlight
Protected methodDrawFillForms
Draw fill forms
Protected methodDrawFillFormsSelection(DrawingContext, ListRect)
Protected methodDrawFillFormsSelection(PdfBitmap, ListRect)
Draws highlights inside a forms
Protected methodDrawLoadingIcon
Draw loading icon
Protected methodDrawPage
Draws page content and fillforms
Protected methodDrawPageBackColor
Draws page background
Protected methodDrawPageBorder
Draws page's border
Protected methodDrawPageSeparators
Draws pages separatoes.
Protected methodDrawRenderedPagesToDevice
Combine two buffers (rendered pages and forms) and draw them to graphics
Protected methodDrawTextHighlight(DrawingContext, ListHighlightInfo, Int32)
Protected methodDrawTextHighlight(PdfBitmap, ListHighlightInfo, Int32)
Draws text highlights
Protected methodDrawTextSelection(DrawingContext, SelectInfo, Int32)
Left for backward compatibility. Actually the text selection is drawn in DrawTextSelection(PdfBitmap, SelectInfo, Int32) method.
Protected methodDrawTextSelection(PdfBitmap, SelectInfo, Int32)
Draws text selection
Public methodGetHighlightedRects
Get a collection of rectangles that represent the highlighted text on a specific page and in accordance with the specified HighlightInfo structure.
Public methodGetSelectedRects(Int32)
Get a collection of rectangles that represent the selected text on a specified page.
Public methodGetSelectedRects(Int32, SelectInfo)
Get a collection of rectangles that represent the selected text on a specific page and in accordance with the specified SelectInfo structure.
Public methodHighlightSelectedText
Highlight selected text on the page by specified color
Public methodHighlightText(Int32, HighlightInfo)
Highlight text on the page
Public methodHighlightText(Int32, Int32, Int32, Color)
Highlight text on the page
Public methodHighlightText(Int32, Int32, Int32, Color, FS_RECTF)
Highlight text on the page
Public methodHilightSelectedText Obsolete.
Highlight selected text on the page by specified color
Protected methodInternalSetCursor
Sets the cursor that is displayed when the mouse pointer is over the control.
Public methodLineDown
Scrolls down within content by one logical unit.
Public methodLineLeft
Scrolls left within content by one logical unit.
Public methodLineRight
Scrolls right within content by one logical unit.
Public methodLineUp
Scrolls up within content by one logical unit.
Public methodLoadDocument(Byte, String)
Loads the PDF document from the specified byte array.
Public methodLoadDocument(Stream, String)
Loads the PDF document from the specified stream.
Public methodLoadDocument(String, String)
Open and load a PDF document from a file.
Public methodMakeVisible
Forces content to scroll until the coordinate space of a Visual object is visible.
Public methodMouseWheelDown
Scrolls down within content after a user clicks the wheel button on a mouse.
Public methodMouseWheelLeft
Scrolls left within content after a user clicks the wheel button on a mouse.
Public methodMouseWheelRight
Scrolls right within content after a user clicks the wheel button on a mouse.
Public methodMouseWheelUp
Scrolls up within content after a user clicks the wheel button on a mouse.
Protected methodOnAfterDocumentChanged
Raises the AfterDocumentChanged event.
Protected methodOnAfterLinkClicked
Raises the AfterLinkClicked event.
Protected methodOnBeforeDocumentChanged
Raises the BeforeDocumentChanged event.
Protected methodOnBeforeLinkClicked
Raises the BeforeLinkClicked event.
Protected methodOnCurrentPageChanged
Raises the CurrentPageChanged event.
Protected methodOnCurrentPageHighlightColorChanged
Protected methodOnDocumentClosed
Raises the DocumentClosed event.
Protected methodOnDocumentClosing
Raises the DocumentClosing event.
Protected methodOnDocumentLoaded
Raises the DocumentLoaded event.
Protected methodOnFormHighlightColorChanged
Raises the FormHighlightColorChanged event.
Protected methodOnFormsAppBeep
Called by the engine when it is required to play the sound
Protected methodOnFormsBlendModeChanged
Raises the FormsBlendModeChanged event.
Protected methodOnFormsDoGotoAction
Called by the engine when it is required to execute a GoTo action
Protected methodOnFormsDoNamedAction
Called by the engine when it is required to execute a named action
Protected methodOnFormsGotoPage
Called by the engine when it is required to execute GoTo operation
Protected methodOnFormsInvalidate
Called by the engine when it is required to redraw the page
Protected methodOnFormsOutputSelectedRect
Called by the engine when it is required to draw selected regions in FillForms
Protected methodOnFormsSetCursor
Called by the engine when it is required to change the cursor
Protected methodOnHighlightedTextChanged
Raises the HighlightedTextChanged event.
Protected methodOnKeyUp
Raises the System.Windows.Forms.Control.KeyUp event.
(Overrides UIElementOnKeyUp(KeyEventArgs).)
Protected methodOnLoadingIconTextChanged
Raises the LoadingIconTextChanged event.
Protected methodOnMouseDoubleClick
Raises the MouseDoubleClick event.
(Overrides ControlOnMouseDoubleClick(MouseButtonEventArgs).)
Protected methodOnMouseDown
Raises the System.Windows.Forms.Control.MouseDown event.
(Overrides UIElementOnMouseDown(MouseButtonEventArgs).)
Protected methodOnMouseLeave
Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
(Overrides UIElementOnMouseLeave(MouseEventArgs).)
Protected methodOnMouseModeChanged
Raises the MouseModeChanged event.
Protected methodOnMouseMove
Raises the System.Windows.Forms.Control.MouseMove event.
(Overrides UIElementOnMouseMove(MouseEventArgs).)
Protected methodOnMouseUp
Raises the System.Windows.Forms.Control.MouseUp event.
(Overrides UIElementOnMouseUp(MouseButtonEventArgs).)
Protected methodOnPageAlignChanged
Raises the PageAlignChanged event.
Protected methodOnPageBackColorChanged
Raises the PageBackColorChanged event.
Protected methodOnPageBorderColorChanged
Raises the PageBorderColorChanged event.
Protected methodOnPageMarginChanged
Raises the PageMarginChanged event.
Protected methodOnPageSeparatorColorChanged
Raises the PageSeparatorColorChanged event.
Protected methodOnPreviewKeyDown
Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
(Overrides UIElementOnPreviewKeyDown(KeyEventArgs).)
Protected methodOnRender
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
(Overrides UIElementOnRender(DrawingContext).)
Protected methodOnRenderFlagsChanged
Raises the RenderFlagsChanged event.
Protected methodOnRenderSizeChanged
Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.
(Overrides FrameworkElementOnRenderSizeChanged(SizeChangedInfo).)
Protected methodOnSelectionChanged
Raises the SelectionChanged event.
Protected methodOnShowCurrentPageHighlightChanged
Protected methodOnShowLoadingIconChanged
Raises the ShowLoadingIconChanged event.
Protected methodOnShowPageSeparatorChanged
Raises the ShowPageSeparatorChanged event.
Protected methodOnSizeModeChanged
Raises the SizeModeChanged event.
Protected methodOnTextSelectColorChanged
Raises the TextSelectColorChanged event.
Protected methodOnTilesCountChanged
Raises the TilesCountChanged event.
Protected methodOnUseProgressiveRenderChanged
Raises the UseProgressiveRenderChanged event.
Protected methodOnViewModeChanged
Raises the ViewModeChanged event.
Protected methodOnZoomChanged
Raises the ZoomChanged event.
Public methodPageDown
Scrolls down within content by one page.
Public methodPageLeft
Scrolls left within content by one page.
Public methodPageRight
Scrolls right within content by one page.
Public methodPageToClient
Computes the location of the specified page point into client coordinates.
Public methodPageUp
Scrolls up within content by one page.
Public methodPointInPage
Determines if the specified point is contained within Pdf page.
Public methodProcessAction
Process the PdfAction
Public methodProcessDestination
Process the PdfDestination.
Protected methodRegenerateAnnots
Create an appearance stream for annotations which do not have this one.
Public methodRemoveHighlightFromSelectedText
Removes highlight from selected text
Public methodRemoveHighlightFromText
Removes highlight from the text
Public methodRemoveHighlightFromText(Int32, Int32, Int32)
Removes highlight from the text
Public methodRemoveHilightFromSelectedText Obsolete.
Removes highlight from selected text
Public methodRotatePage
Rotates the specified page to the specified angle.
Public methodScrollToChar(Int32)
Scrolls the control view to the specified character on the current page
Public methodScrollToChar(Int32, Int32)
Scrolls the control view to the specified character on the specified page
Public methodScrollToPage
Scrolls the control view to the specified page.
Public methodScrollToPoint
Scrolls the control view to the specified point on the specified page
Public methodSelectText(SelectInfo)
Selects the text contained in specified pages.
Public methodSelectText(Int32, Int32, Int32, Int32)
Selects the text contained in specified pages.
Public methodSetHorizontalOffset
Sets the amount of horizontal offset.
Public methodSetVerticalOffset
Sets the amount of vertical offset.
Public methodUpdateDocLayout
Ensures that all sizes and positions of pages of a PdfViewer control are properly updated for layout.
Top
Events
  NameDescription
Public eventAfterDocumentChanged
Occurs whenever the Document property is changed.
Public eventAfterLinkClicked
Occurs after PdfLink or WebLink on the page was clicked.
Public eventBeforeDocumentChanged
Occurs immediately before the document property would be changed.
Public eventBeforeLinkClicked
Occurs before PdfLink or WebLink on the page was clicked.
Public eventCurrentPageChanged
Occurs when the CurrentPage or CurrentIndex property has changed.
Public eventCurrentPageHighlightColorChanged
Occurs when the CurrentPageHighlightColor property has changed.
Public eventDocumentClosed
Occurs whenever the document unloads.
Public eventDocumentClosing
Occurs before the document unloads.
Public eventDocumentLoaded
Occurs whenever the document loads.
Public eventFormHighlightColorChanged
Event raised when the value of the FormHighlightColor property is changed on Control.
Public eventFormsBlendModeChanged
Occurs when the FormsBlendMode property has changed.
Public eventHighlightedTextChanged
Occurs when the text highlighting changed
Public eventLoadingIconTextChanged
Occurs when the value of the LoadingIconText property has changed.
Public eventMouseModeChanged
Occurs when the value of the MouseModes property has changed.
Public eventPageAlignChanged
Occurs when the value of the PageVAlign or PageHAlign property has changed.
Public eventPageBackColorChanged
Event raised when the value of the PageBackColor property is changed on Control..
Public eventPageBorderColorChanged
Event raised when the value of the PageBorderColor property is changed on Control.
Public eventPageMarginChanged
Occurs when the PageMargin property has changed.
Public eventPageSeparatorColorChanged
Occurs when the PageSeparatorColor property has changed.
Public eventRenderFlagsChanged
Occurs when the value of the RenderFlags property has changed.
Public eventSelectionChanged
Occurs when the current selection has changed.
Public eventShowCurrentPageHighlightChanged
Occurs when the ShowCurrentPageHighlight property has changed.
Public eventShowLoadingIconChanged
Occurs when the value of the ShowLoadingIcon property has changed.
Public eventShowPageSeparatorChanged
Occurs when the ShowPageSeparator property has changed.
Public eventSizeModeChanged
Occurs when the SizeMode property has changed.
Public eventTextSelectColorChanged
Event raised when the value of the TextSelectColor property is changed on Control.
Public eventTilesCountChanged
Occurs when the value of the TilesCount property has changed.
Public eventUseProgressiveRenderChanged
Occurs when the value of the UseProgressiveRender property has changed.
Public eventViewModeChanged
Occurs when the ViewMode property has changed.
Public eventZoomChanged
Occurs when the Zoom property has changed.
Top
Fields
  NameDescription
Public fieldStatic memberCurrentPageHighlightColorProperty
DependencyProperty as the backing store for CurrentPageHighlightColor
Public fieldStatic memberDocumentProperty
DependencyProperty as the backing store for PdfViewer
Public fieldStatic memberFormHighlightColorProperty
DependencyProperty as the backing store for FormHighlightColor
Public fieldStatic memberFormsBlendModeProperty
DependencyProperty as the backing store for FormsBlendMode
Public fieldStatic memberLoadingIconTextProperty
DependencyProperty as the backing store for LoadingIconText
Public fieldStatic memberMouseModeProperty
DependencyProperty as the backing store for MouseMode
Public fieldStatic memberOptimizedLoadThresholdProperty
DependencyProperty as the backing store for OptimizedLoadThreshold
Public fieldStatic memberPaddingProperty
DependencyProperty as the backing store for Padding
Public fieldStatic memberPageAutoDisposeProperty
DependencyProperty as the backing store for PageAutoDispose
Public fieldStatic memberPageBackColorProperty
DependencyProperty as the backing store for PageBackColor
Public fieldStatic memberPageBorderColorProperty
DependencyProperty as the backing store for PageBorderColor
Public fieldStatic memberPageHAlignProperty
DependencyProperty as the backing store for PageHAlign
Public fieldStatic memberPageMarginProperty
DependencyProperty as the backing store for PageMargin
Public fieldStatic memberPageSeparatorColorProperty
DependencyProperty as the backing store for PageSeparatorColor
Public fieldStatic memberPageVAlignProperty
DependencyProperty as the backing store for PageVAlign
Public fieldStatic memberRenderFlagsProperty
DependencyProperty as the backing store for RenderFlags
Public fieldStatic memberSelectedTextProperty
DependencyProperty as the backing store for SelectedText
Public fieldStatic memberShowCurrentPageHighlightProperty
DependencyProperty as the backing store for ShowCurrentPageHighlight
Public fieldStatic memberShowLoadingIconProperty
DependencyProperty as the backing store for ShowLoadingIcon
Public fieldStatic memberShowPageSeparatorProperty
DependencyProperty as the backing store for ShowPageSeparator
Public fieldStatic memberSizeModeProperty
DependencyProperty as the backing store for SizeMode
Public fieldStatic memberTextSelectColorProperty
DependencyProperty as the backing store for TextSelectColor
Public fieldStatic memberTilesCountProperty
DependencyProperty as the backing store for TilesCount
Public fieldStatic memberUseProgressiveRenderProperty
DependencyProperty as the backing store for UseProgressiveRender
Public fieldStatic memberViewModeProperty
DependencyProperty as the backing store for ViewMode
Public fieldStatic memberZoomProperty
DependencyProperty as the backing store for Zoom
Top
See Also