menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfDocumentView - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfDocumentView

    Interaction logic for PdfView.xaml

    Inheritance
    System.Object
    PdfDocumentView
    Namespace: Syncfusion.Windows.PdfViewer
    Assembly: Syncfusion.PdfViewer.WPF.dll
    Syntax
    public class PdfDocumentView : Control

    Constructors

    PdfDocumentView()

    Initializes a new instance of the PdfDocumentView class.

    Declaration
    public PdfDocumentView()

    Fields

    AnnotationCommandParameterProperty

    Identifies the AnnotationCommandParameter.

    Declaration
    public static readonly DependencyProperty AnnotationCommandParameterProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    AnnotationCommandProperty

    Identifies the AnnotationCommand.

    Declaration
    public static readonly DependencyProperty AnnotationCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DecreaseZoomCommandProperty

    Identifies the DecreaseZoomCommand.

    Declaration
    public static readonly DependencyProperty DecreaseZoomCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    FirstPageCommandProperty

    Identifies the FirstPageCommand.

    Declaration
    public static readonly DependencyProperty FirstPageCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    GoToPageCommandParameterProperty

    Identifies the GoToPageCommandParameter.

    Declaration
    public static readonly DependencyProperty GoToPageCommandParameterProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    GoToPageCommandProperty

    Identifies the GoToPageCommand.

    Declaration
    public static readonly DependencyProperty GoToPageCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IncreaseZoomCommandProperty

    Identifies the IncreaseZoomCommand.

    Declaration
    public static readonly DependencyProperty IncreaseZoomCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IsDocumentEditedProperty

    Identifies theIsDocumentEdited dependency property.

    Declaration
    public static readonly DependencyProperty IsDocumentEditedProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The value will be true when the document is edited by adding, editing annotations or re-organizing the pages or editing form fields.

    LastPageCommandProperty

    Identifies the LastPageCommand.

    Declaration
    public static readonly DependencyProperty LastPageCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    NextPageCommandProperty

    Identifies the NextPageCommand.

    Declaration
    public static readonly DependencyProperty NextPageCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PreviousPageCommandProperty

    Identifies the PreviousPageCommand.

    Declaration
    public static readonly DependencyProperty PreviousPageCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PrintCommandProperty

    Identifies the PrintCommand.

    Declaration
    public static readonly DependencyProperty PrintCommandProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ZoomModeProperty

    Identifies the ZoomMode property.

    Declaration
    public static DependencyProperty ZoomModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    Annotation

    Gets the collection of different types of annotations in PdfDocumentView

    Declaration
    public Annotation Annotation { get; }
    Property Value
    Type
    Annotation

    AnnotationCommand

    Gets or sets the value that represents Annotation command of PdfDocumentView.

    Declaration
    public ICommand AnnotationCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    AnnotationCommandParameter

    Gets or Sets the AnnotationCommandParameter of PdfViewerControl

    Declaration
    public object AnnotationCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    AnnotationMode

    Gets or Sets the annotation mode, by default this value is set to None.

    Declaration
    public PdfDocumentView.PdfViewerAnnotationMode AnnotationMode { get; set; }
    Property Value
    Type
    PdfDocumentView.PdfViewerAnnotationMode

    ArrowAnnotationSettings

    Gets or Sets the arrow shape settings.

    Declaration
    public PdfViewerArrowSettings ArrowAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerArrowSettings

    CanGoToFirstPage

    Return the boolean value whether we can move to first page.

    Declaration
    public bool CanGoToFirstPage { get; }
    Property Value
    Type
    System.Boolean

    CanGoToLastPage

    Return the boolean value whether we can move to last page.

    Declaration
    public bool CanGoToLastPage { get; }
    Property Value
    Type
    System.Boolean

    CanGoToNextPage

    Return the boolean value whether we can move to next page.

    Declaration
    public bool CanGoToNextPage { get; }
    Property Value
    Type
    System.Boolean

    CanGoToPreviousPage

    Return the boolean value whether we can move to previous page.

    Declaration
    public bool CanGoToPreviousPage { get; }
    Property Value
    Type
    System.Boolean

    CircleAnnotationSettings

    Get and Set the circle annotation settings

    Declaration
    public PdfViewerCircleSettings CircleAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerCircleSettings

    ClientRectangle

    Gets the rectangle that represents the client area (viewport) of the control, without the non-client elements such as toolbars, side bars and scroll bars.

    Declaration
    public Rect ClientRectangle { get; }
    Property Value
    Type
    System.Windows.Rect

    CurrentPageIndex

    Get the index of the current page displayed in the PdfDocumentView

    Declaration
    public int CurrentPageIndex { get; set; }
    Property Value
    Type
    System.Int32

    CurrentPageOnPrint

    Gets or Sets the CurrentPageOnPrint in PdfDocumentView

    Declaration
    public int CurrentPageOnPrint { get; set; }
    Property Value
    Type
    System.Int32

    CurrentUser

    Get or set current user name of the PDFViewer.Default the current user will be system name.

    Declaration
    public string CurrentUser { get; set; }
    Property Value
    Type
    System.String

    Cursor

    Gets or sets the cursor that displays when the mouse pointer is over this element.

    Declaration
    public Cursor Cursor { get; set; }
    Property Value
    Type
    System.Windows.Input.Cursor

    CursorMode

    Gets and sets the Cursor Mode

    Declaration
    public PdfViewerCursorMode CursorMode { get; set; }
    Property Value
    Type
    PdfViewerCursorMode

    DecreaseZoomCommand

    Gets or sets the value that represents Decrease Zoom command of PdfDocumentView.

    Declaration
    public ICommand DecreaseZoomCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    DocumentInfo

    Gets the information of the PDF document loaded

    Declaration
    public DocumentInfo DocumentInfo { get; }
    Property Value
    Type
    DocumentInfo

    FirstPageCommand

    Gets or sets the value that represents First Page command of PdfDocumentView.

    Declaration
    public ICommand FirstPageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    FreeTextAnnotationSettings

    Get and Set the freetext annotation settings

    Declaration
    public PdfViewerFreeTextSettings FreeTextAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerFreeTextSettings

    GoToPageCommand

    Gets or sets the value that represents Go To Page command of PdfDocumentView.

    Declaration
    public ICommand GoToPageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    GoToPageCommandParameter

    Gets or Sets the GoToPageCommandParameter of PdfViewerControl

    Declaration
    public object GoToPageCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    HandwrittenSignatureSettings

    Gets and sets the settings for hand written signature.

    Declaration
    public HandwrittenSignatureSettings HandwrittenSignatureSettings { get; set; }
    Property Value
    Type
    HandwrittenSignatureSettings

    HighlightAnnotationSettings

    Get and Set the highlight annotation settings

    Declaration
    public PdfViewerHighlightSettings HighlightAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerHighlightSettings

    HorizontalOffset

    Gets or sets the horizontal offset of the control that has been scrolled from the left of the document.

    Declaration
    public double HorizontalOffset { get; set; }
    Property Value
    Type
    System.Double

    IncreaseZoomCommand

    Gets or sets the value that represents Increase Zoom command of PdfDocumentView.

    Declaration
    public ICommand IncreaseZoomCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    InkAnnotationSettings

    Get and Set the ink annotation settings

    Declaration
    public PdfViewerInkSettings InkAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerInkSettings

    IsDocumentEdited

    Gets the value that indicates whether the document is edited by adding, editing annotations or re-organizing the pages or editing form fields.

    Declaration
    public bool IsDocumentEdited { get; }
    Property Value
    Type
    System.Boolean

    IsTextSearchEnabled

    Represents whether text search for the document is enabled or not. Default value is true.

    Declaration
    public bool IsTextSearchEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    IsTextSelectionEnabled

    Represents whether text selection for the document is enabled or not

    Declaration
    public bool IsTextSelectionEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    ItemSource

    Enables the PdfDocumentView to load a document from XAML as string or stream.

    Declaration
    public object ItemSource { get; set; }
    Property Value
    Type
    System.Object

    LastPageCommand

    Gets or sets the value that represents Last Page command of PdfDocumentView.

    Declaration
    public ICommand LastPageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    Layers

    Gets the collection of layers present in the PDF document.

    Declaration
    public LayerCollection Layers { get; }
    Property Value
    Type
    LayerCollection

    LineAnnotationSettings

    Get and Set the line annotation settings

    Declaration
    public PdfViewerLineSettings LineAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerLineSettings

    LoadedDocument

    Gets or Sets the LoadedDocument of PdfDocumentView

    Declaration
    public PdfLoadedDocument LoadedDocument { get; set; }
    Property Value
    Type
    PdfLoadedDocument

    LoadingIndicator

    Gets or Sets the Loading Indicator

    Declaration
    public PdfLoadingIndicator LoadingIndicator { get; set; }
    Property Value
    Type
    PdfLoadingIndicator

    MaximumZoomPercentage

    Gets or sets the maximum zoom percentage of the PdfDocumentView. The default value is 400.

    Declaration
    public int MaximumZoomPercentage { get; set; }
    Property Value
    Type
    System.Int32
    Remarks

    If the rendering engine is Pdfium, the value should be in between the value of MinimumZoomPercentage and 6400. If the rendering engine is SfPdf, the value should be in between the value of MinimumZoomPercentage and 800.

    MinimumZoomPercentage

    Gets or sets the minimum zoom percentage of the PdfDocumentView. The default value is 50.

    Declaration
    public int MinimumZoomPercentage { get; set; }
    Property Value
    Type
    System.Int32
    Remarks

    The value should be in between 10 and the value ofMaximumZoomPercentage.

    NextPageCommand

    Gets or Sets the NextPageCommand of PdfViewerControl

    Declaration
    public ICommand NextPageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    PageBorder

    Gets or sets thePageBorder.

    Declaration
    public PageBorder PageBorder { get; set; }
    Property Value
    Type
    PageBorder

    PageCount

    Gets the page count

    Declaration
    public int PageCount { get; }
    Property Value
    Type
    System.Int32

    PageOrganizer

    Provide functionalities to handle the collection of pages.

    Declaration
    public PageOrganizer PageOrganizer { get; }
    Property Value
    Type
    PageOrganizer

    PageRedactor

    Provides functionalities to perform page redaction

    Declaration
    public PageRedactor PageRedactor { get; }
    Property Value
    Type
    PageRedactor

    PolygonAnnotationSettings

    Gets or Sets the polygon annotation settings.

    Declaration
    public PdfViewerPolygonSettings PolygonAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerPolygonSettings

    PolylineAnnotationSettings

    Gets or Sets the polyline annotation settings.

    Declaration
    public PdfViewerPolylineSettings PolylineAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerPolylineSettings

    PreviousPageCommand

    Gets or sets the value that represents Previous Page command of PdfDocumentView.

    Declaration
    public ICommand PreviousPageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    PrintCommand

    Gets or sets the value that represents Print command of PdfDocumentView.

    Declaration
    public ICommand PrintCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    PrintDocument

    Gets the fixed-format document of the PDF file loaded in the PdfDocumentView,

    Declaration
    public FixedDocument PrintDocument { get; }
    Property Value
    Type
    System.Windows.Documents.FixedDocument

    PrinterSettings

    Represents printer settings for the document to be printed.

    Declaration
    public PdfViewerPrinterSettings PrinterSettings { get; set; }
    Property Value
    Type
    PdfViewerPrinterSettings

    PrintFromPage

    Gets or Sets the PrintFromPage

    Declaration
    public int PrintFromPage { get; set; }
    Property Value
    Type
    System.Int32

    PrintHeight

    Gets or Sets the PrintHeight

    Declaration
    public int PrintHeight { get; set; }
    Property Value
    Type
    System.Int32

    PrintToPage

    Gets or Sets the PrintToPage

    Declaration
    public int PrintToPage { get; set; }
    Property Value
    Type
    System.Int32

    PrintWidth

    Gets or Sets the PrintWidth

    Declaration
    public int PrintWidth { get; set; }
    Property Value
    Type
    System.Int32

    ProgressIndicator

    Gets or Sets the loading progress indicator settings

    Declaration
    public PdfProgressIndicator ProgressIndicator { get; set; }
    Property Value
    Type
    PdfProgressIndicator

    RectangleAnnotationSettings

    Get and Set the rectangle annotation settings

    Declaration
    public PdfViewerRectangleSettings RectangleAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerRectangleSettings

    RedactionSettings

    Gets and sets the redaction settings.

    Declaration
    public RedactionSettings RedactionSettings { get; }
    Property Value
    Type
    RedactionSettings

    RedoCommand

    Defines Command for Redo the changes

    Declaration
    public RedoCommand RedoCommand { get; set; }
    Property Value
    Type
    RedoCommand

    ReferencePath

    Specifes the Pdfium path in PDF Viewer control

    Declaration
    public string ReferencePath { get; set; }
    Property Value
    Type
    System.String

    RenderingEngine

    Specifes the rendering mode in PDF Viewer control.

    Declaration
    [Obsolete("The SfPdf engine is no longer supported.By default, PDFium engine will be used.So avoid setting the Rendering engine for the PDF Viewer control")]
    public PdfRenderingEngine RenderingEngine { get; set; }
    Property Value
    Type
    PdfRenderingEngine

    SaveDocumentCommand

    Gets the command that saves the document in the file path passed as command parameter.

    Declaration
    public ICommand SaveDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.ICommand
    Examples
    if(pdfDocumentView.SaveDocumentCommand.CanExecute(@"C:\temp\Output.pdf"))
    pdfDocumentView.SaveDocumentCommand.Execute(@"C:\temp\Output.pdf");
    See Also
    Save(String)

    SelectedText

    Gets the selected text

    Declaration
    public string SelectedText { get; }
    Property Value
    Type
    System.String

    SelectorSettings

    Gets or sets the default appearance of annotation selector.

    Declaration
    public SelectorSettings SelectorSettings { get; set; }
    Property Value
    Type
    SelectorSettings

    ShowHorizontalScrollBar

    Gets and sets the boolean value to enable and disable the horizontal scrollbar in PdfDocumentView

    Declaration
    public bool ShowHorizontalScrollBar { get; set; }
    Property Value
    Type
    System.Boolean

    ShowPageNumber

    Gets or sets whether to display page number when scrolling.

    Declaration
    public bool ShowPageNumber { get; set; }
    Property Value
    Type
    System.Boolean

    ShowScrollbar

    Gets and Sets the boolean value to Enable and Disable the Horizontal and Vertical Scrollbars in PDF Document View

    Declaration
    public bool ShowScrollbar { get; set; }
    Property Value
    Type
    System.Boolean

    ShowVerticalScrollBar

    Gets and sets the boolean value to enable and disable the vertical scrollbar in PdfDocumentView

    Declaration
    public bool ShowVerticalScrollBar { get; set; }
    Property Value
    Type
    System.Boolean

    SquigglyAnnotationSettings

    Gets or sets the default settings for squiggly annotation.

    Declaration
    public PdfViewerSquigglySettings SquigglyAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerSquigglySettings

    StampAnnotationSettings

    Gets and sets the stamp annotation settings.

    Declaration
    public PdfViewerStampSettings StampAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerStampSettings

    StickyNoteAnnotationSettings

    Gets and sets the sticky note annotation settings.

    Declaration
    public PdfViewerStickyNoteSettings StickyNoteAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerStickyNoteSettings

    StrikethroughAnnotationSettings

    Get and Set the strikethrough annotation settings

    Declaration
    public PdfViewerStrikethroughSettings StrikethroughAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerStrikethroughSettings

    TextExtractionEngine

    Gets or sets the engine for extracting text information from PDF documents and using it for text-based operations such as text selection, search and more. The default value is Pdfium.

    Declaration
    [Obsolete("The SfPdf engine is no longer supported. By default, PDFium engine will be used. So avoid setting the text extraction engine for the PDF Viewer control")]
    public PdfTextExtractionEngine TextExtractionEngine { get; set; }
    Property Value
    Type
    PdfTextExtractionEngine

    UnderlineAnnotationSettings

    Get and Set the underline annotation settings

    Declaration
    public PdfViewerUnderlineSettings UnderlineAnnotationSettings { get; set; }
    Property Value
    Type
    PdfViewerUnderlineSettings

    UndoCommand

    Defines Command for Undo the changes

    Declaration
    public UndoCommand UndoCommand { get; set; }
    Property Value
    Type
    UndoCommand

    UndoRedoSettings

    Gets or sets the undo/redo settings

    Declaration
    public UndoRedoSettings UndoRedoSettings { get; set; }
    Property Value
    Type
    UndoRedoSettings

    UnloadCommand

    Gets or sets the value that represents unload the current document PdfDocumentView.

    Declaration
    public ICommand UnloadCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    VerticalOffset

    Gets or sets the vertical offset of the control that has been scrolled down from the top of the document.

    Declaration
    public double VerticalOffset { get; set; }
    Property Value
    Type
    System.Double

    ZoomMode

    Gets and sets the Zoom Mode

    Declaration
    public ZoomMode ZoomMode { get; set; }
    Property Value
    Type
    ZoomMode

    ZoomPercentage

    Gets the current zoom percentage

    Declaration
    public int ZoomPercentage { get; }
    Property Value
    Type
    System.Int32

    Methods

    AddHandwrittenSignature(Path, Dictionary<Int32, List<RectangleF>>)

    Add signatures to the specified pages and bounds collection.

    Declaration
    public void AddHandwrittenSignature(Path signature, Dictionary<int, List<RectangleF>> bounds)
    Parameters
    Type Name Description
    System.Windows.Shapes.Path signature

    The signature to be added.

    System.Collections.Generic.Dictionary<System.Int32, System.Collections.Generic.List<System.Drawing.RectangleF>> bounds

    Collection of position and size of the signatures to be added. Where key is the page number which ranges from 1 to page count and values are bounds.

    AddHandwrittenSignature(Path, Int32, RectangleF)

    Add signature to the specified page and bounds.

    Declaration
    public void AddHandwrittenSignature(Path signature, int pageNumber, RectangleF bounds)
    Parameters
    Type Name Description
    System.Windows.Shapes.Path signature

    The signature to be added.

    System.Int32 pageNumber

    The page number in which the signature to be added. The value ranges from 1 to page count.

    System.Drawing.RectangleF bounds

    Position and size of the signature to be added.

    AddStamp(PdfStampAnnotation, Int32, Point)

    Adds a stamp on the PDF page in the specified position, with the original size of the stamp.

    Declaration
    public void AddStamp(PdfStampAnnotation stamp, int pageNumber, Point position)
    Parameters
    Type Name Description
    PdfStampAnnotation stamp

    Specifies the stamp that will be added on the page.

    System.Int32 pageNumber

    Specifies the page number to which the stamp should be added.The value ranges from 1 to total page count.

    System.Windows.Point position

    Specifies where the stamp should be placed on the page.

    AddStamp(PdfStampAnnotation, Int32, Point, Size)

    Adds a stamp on the PDF page with the specified position and size.

    Declaration
    public void AddStamp(PdfStampAnnotation stamp, int pageNumber, Point position, Size stampSize)
    Parameters
    Type Name Description
    PdfStampAnnotation stamp

    Specifies the stamp that will be added on the page.

    System.Int32 pageNumber

    Specifies the page number to which the stamp should be added. The value ranges from 1 to total page count.

    System.Windows.Point position

    Specifies where the stamp should be placed on the page.

    System.Drawing.Size stampSize

    Specifies the size of the stamp.

    ClearAllAnnotations()

    Delete all the annotations in the whole PDF document.

    Declaration
    public void ClearAllAnnotations()

    ClearAllAnnotations(Int32)

    Declaration
    public void ClearAllAnnotations(int pageNumber)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    CloseSelection()

    Closes the selection bounds and popups if it is opened.

    Declaration
    public void CloseSelection()

    ConvertClientPointToPagePoint(Point, Int32)

    Converts the client point to a page point.

    Declaration
    public Point ConvertClientPointToPagePoint(Point clientPoint, int pageNumber)
    Parameters
    Type Name Description
    System.Windows.Point clientPoint

    The client point to convert. It is a point determined from the top-left of the client area (viewport). You may get to the client area using the ClientRectangle property.

    System.Int32 pageNumber

    The number of the page from which the point will be computed. You can get the page number from the client point using the method GetPageNumberFromClientPoint(Point) method.

    Returns
    Type Description
    System.Windows.Point

    The converted point in page coordinates.

    ConvertPagePointToClientPoint(Point, Int32)

    Converts a page point to the client point.

    Declaration
    public Point ConvertPagePointToClientPoint(Point pagePoint, int pageNumber)
    Parameters
    Type Name Description
    System.Windows.Point pagePoint

    The page point to convert.

    System.Int32 pageNumber

    The number of the page from which the point is given.

    Returns
    Type Description
    System.Windows.Point

    The converted client point. The client point is determined from the top-left of the client area (viewport).

    ConvertPagePointToScrollingPoint(Point, Int32)

    Converts a page point to the scrolling point.

    Declaration
    public Point ConvertPagePointToScrollingPoint(Point pagePoint, int pageNumber)
    Parameters
    Type Name Description
    System.Windows.Point pagePoint

    The page point to convert.

    System.Int32 pageNumber

    The number of the page from which the point is given.

    Returns
    Type Description
    System.Windows.Point

    The converted scrolling point. The scrolling point is determined from the document's top-left corner.

    DeleteAnnotation(String)

    Deletes an annotation on a document based on its name.

    Declaration
    public bool DeleteAnnotation(string annotationName)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and deleted. Otherwise, it returns false.

    DeleteAnnotation(String, Int32)

    Deletes an annotation on a page based on its name and the page number.

    Declaration
    public bool DeleteAnnotation(string annotationName, int pageNumber)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Int32 pageNumber

    Specifes the page number on which the annotation is located. The value ranges from 1 to page count.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and deleted. Otherwise, it returns false.

    ExportAnnotations(Stream, AnnotationDataFormat)

    Declaration
    public void ExportAnnotations(Stream stream, AnnotationDataFormat format)
    Parameters
    Type Name Description
    System.IO.Stream stream
    AnnotationDataFormat format

    ExportAnnotations(String, AnnotationDataFormat)

    Exports annotations from the viewer as a file in a specified data format.

    Declaration
    public void ExportAnnotations(string fileName, AnnotationDataFormat format)
    Parameters
    Type Name Description
    System.String fileName

    The full path to file which contains the annotation information.

    AnnotationDataFormat format

    The AnnotationDataFormat data format.

    ExportAsImage(Int32)

    Exports the specified page as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource ExportAsImage(int pageIndex)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The page index to be converted into System.Windows.Media.Imaging.BitmapSource

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource

    Returns the specified page as System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, Boolean)

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 pageIndex
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, SizeF, Boolean)

    Exports the specified page as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, SizeF customSize, bool keepAspectRatio)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The page index to be converted into System.Windows.Media.Imaging.BitmapSource

    System.Drawing.SizeF customSize

    The custom size of the converted System.Windows.Media.Imaging.BitmapSource

    System.Boolean keepAspectRatio

    Whether need to maintain the pdf page size

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource

    Returns the specified page as System.Windows.Media.Imaging.BitmapSource with custom size

    ExportAsImage(Int32, SizeF, Boolean, Boolean)

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, SizeF customSize, bool keepAspectRatio, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 pageIndex
    System.Drawing.SizeF customSize
    System.Boolean keepAspectRatio
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, SizeF, Single, Single, Boolean)

    Exports the specified page as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, SizeF customSize, float dpiX, float dpiY, bool keepAspectRatio)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The page index to be converted into image

    System.Drawing.SizeF customSize

    The custom size of the converted System.Windows.Media.Imaging.BitmapSource

    System.Single dpiX

    The horizontal DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Single dpiY

    The vertical DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Boolean keepAspectRatio

    Whether need to maintain the pdf page size

    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, SizeF, Single, Single, Boolean, Boolean)

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, SizeF customSize, float dpiX, float dpiY, bool keepAspectRatio, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 pageIndex
    System.Drawing.SizeF customSize
    System.Single dpiX
    System.Single dpiY
    System.Boolean keepAspectRatio
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, Int32)

    Exports the specified pages as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The starting page index

    System.Int32 endIndex

    The ending page index

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource[]

    Returns the specified pages as System.Windows.Media.Imaging.BitmapSource

    ExportAsImage(Int32, Int32, Boolean)

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 endIndex
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource[]

    ExportAsImage(Int32, Int32, SizeF, Boolean)

    Exports the specified pages as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, SizeF customSize, bool keepAspectRatio)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The starting page index

    System.Int32 endIndex

    The ending page index

    System.Drawing.SizeF customSize

    The custom size of the converted System.Windows.Media.Imaging.BitmapSource

    System.Boolean keepAspectRatio

    Whether need to maintain the pdf page size

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource[]

    Returns the specified pages as System.Windows.Media.Imaging.BitmapSource with custom size

    ExportAsImage(Int32, Int32, SizeF, Boolean, Boolean)

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, SizeF customSize, bool keepAspectRatio, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 endIndex
    System.Drawing.SizeF customSize
    System.Boolean keepAspectRatio
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource[]

    ExportAsImage(Int32, Int32, SizeF, Single, Single, Boolean)

    Exports the specified pages as System.Windows.Media.Imaging.BitmapSource

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, SizeF customSize, float dpiX, float dpiY, bool keepAspectRatio)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The starting page index

    System.Int32 endIndex

    The ending page index

    System.Drawing.SizeF customSize

    The custom size of the converted System.Windows.Media.Imaging.BitmapSource

    System.Single dpiX

    The horizontal DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Single dpiY

    The vertical DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Boolean keepAspectRatio

    Whether need to maintain the pdf page size

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource[]

    Returns the specified pages as System.Windows.Media.Imaging.BitmapSource with custom size and resolution

    ExportAsImage(Int32, Int32, SizeF, Single, Single, Boolean, Boolean)

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, SizeF customSize, float dpiX, float dpiY, bool keepAspectRatio, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 endIndex
    System.Drawing.SizeF customSize
    System.Single dpiX
    System.Single dpiY
    System.Boolean keepAspectRatio
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource[]

    ExportAsImage(Int32, Int32, Single, Single)

    Exports the specified pages as System.Windows.Media.Imaging.BitmapSource with respect to dpi specified.

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, float dpiX, float dpiY)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The starting page index

    System.Int32 endIndex

    The ending page index

    System.Single dpiX

    The horizontal DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Single dpiY

    The vertical DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource[]

    Returns the specified pages as System.Windows.Media.Imaging.BitmapSource with custom resolution

    ExportAsImage(Int32, Int32, Single, Single, Boolean)

    Declaration
    public BitmapSource[] ExportAsImage(int startIndex, int endIndex, float dpiX, float dpiY, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 endIndex
    System.Single dpiX
    System.Single dpiY
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource[]

    ExportAsImage(Int32, Single, Single)

    Exports the specified page as System.Windows.Media.Imaging.BitmapSource with respect to dpi specified.

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, float dpiX, float dpiY)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The page index to be converted into System.Windows.Media.Imaging.BitmapSource

    System.Single dpiX

    The horizontal DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    System.Single dpiY

    The vertical DPI of the resultant System.Windows.Media.Imaging.BitmapSource.

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapSource

    Returns the specified page as System.Windows.Media.Imaging.BitmapSource with custom resolution

    ExportAsImage(Int32, Single, Single, Boolean)

    Declaration
    public BitmapSource ExportAsImage(int pageIndex, float dpiX, float dpiY, bool keepTransparency)
    Parameters
    Type Name Description
    System.Int32 pageIndex
    System.Single dpiX
    System.Single dpiY
    System.Boolean keepTransparency
    Returns
    Type
    System.Windows.Media.Imaging.BitmapSource

    ExportFormData(String, DataFormat, String)

    Export data from a form file.

    Declaration
    public void ExportFormData(string fileName, DataFormat dataFormat, string formName)
    Parameters
    Type Name Description
    System.String fileName

    Name of the document which is need to export.

    DataFormat dataFormat

    The form data format.

    System.String formName

    The name of the PDF file the data is exported from.

    ExtractText(Int32, out TextLines)

    Extracts text from the page of PDF document with lines and words collection.

    Declaration
    public string ExtractText(int index, out TextLines textLines)
    Parameters
    Type Name Description
    System.Int32 index
    TextLines textLines

    Holds the lines with bounds in the page.

    Returns
    Type Description
    System.String

    The Extracted Text.

    ExtractText(Int32, out List<TextData>)

    Extracts text along with its format from the PDF Page.

    Declaration
    public string ExtractText(int index, out List<TextData> textDataCollection)
    Parameters
    Type Name Description
    System.Int32 index
    System.Collections.Generic.List<TextData> textDataCollection

    Provides the text data collection

    Returns
    Type Description
    System.String

    Returns the extracted text.

    FindText(List<String>, out Dictionary<Int32, List<TextSearchResult>>)

    Returns the dictionary of page number and list of captured terms in the PDF document.

    Declaration
    public bool FindText(List<string> searchItems, out Dictionary<int, List<TextSearchResult>> searchResults)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> searchItems

    List of items to be searched.

    System.Collections.Generic.Dictionary<System.Int32, System.Collections.Generic.List<Syncfusion.Windows.PdfViewer.TextSearchResult>> searchResults

    The dictionary of page number and list of search results.

    Returns
    Type Description
    System.Boolean

    Returns true if found any match

    FindText(List<String>, Int32, out List<MatchedItem>)

    Returns the information of the matched texts in a specific page

    Declaration
    public bool FindText(List<string> searchItems, int pageIndex, out List<MatchedItem> searchResults)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> searchItems

    The collection of text to be searched.

    System.Int32 pageIndex

    The specified page index.

    System.Collections.Generic.List<MatchedItem> searchResults

    Holds the information of the matched texts

    Returns
    Type Description
    System.Boolean

    Returns true if found any match

    FindText(String, Int32, out List<RectangleF>)

    Returns the bounds of the matched texts in a specific page.

    Declaration
    public bool FindText(string text, int pageIndex, out List<RectangleF> matchRectCollection)
    Parameters
    Type Name Description
    System.String text

    The text to be searched.

    System.Int32 pageIndex

    pThe specified page index.

    System.Collections.Generic.List<System.Drawing.RectangleF> matchRectCollection

    Holds the bounds of the matched texts.

    Returns
    Type Description
    System.Boolean

    Returns true if found any matchRectCollection.

    GetPageNumberFromClientPoint(Point)

    Gets the number of the page for the given client point.

    Declaration
    public int GetPageNumberFromClientPoint(Point clientPoint)
    Parameters
    Type Name Description
    System.Windows.Point clientPoint

    The client point. It is a point determined from the top-left of the client area (viewport). You can get the client area using the ClientRectangle property.

    Returns
    Type Description
    System.Int32

    The number of the page.

    GoToBookmark(PdfBookmark)

    Navigates to the location of the bookmark.

    Declaration
    public void GoToBookmark(PdfBookmark bookmark)
    Parameters
    Type Name Description
    PdfBookmark bookmark

    the bookmark object to which the view has to navigate

    GoToFirstPage()

    Navigates to the First page.

    Declaration
    public void GoToFirstPage()

    GoToLastPage()

    Navigates to the Last page.

    Declaration
    public void GoToLastPage()

    GoToNextPage()

    Navigates to the Next page.

    Declaration
    public void GoToNextPage()

    GoToPageAtIndex(Int32)

    Navigates to the specified page.

    Declaration
    public void GoToPageAtIndex(int pageIndex)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    GoToPageAtIndexAndOffset(Int32, Single)

    Moves the Vscroll bar to specified page and offset location

    Declaration
    public void GoToPageAtIndexAndOffset(int pageIndex, float destOffset)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The destination page

    System.Single destOffset

    The destination offset in the page

    GoToPreviousPage()

    Navigates to the Previous page.

    Declaration
    public void GoToPreviousPage()

    HideAnnotation(String)

    Hides an annotation on a document based on its name.

    Declaration
    public bool HideAnnotation(string annotationName)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and hidden. Otherwise, it returns false.

    HideAnnotation(String, Int32)

    Hides an annotation on a page based on its name and the page number.

    Declaration
    public bool HideAnnotation(string annotationName, int pageNumber)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Int32 pageNumber

    Specifes the page number on which the annotation is located. The value ranges from 1 to page count.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and hidden. Otherwise, it returns false.

    ImportAnnotations(Stream, AnnotationDataFormat)

    Declaration
    public void ImportAnnotations(Stream stream, AnnotationDataFormat format)
    Parameters
    Type Name Description
    System.IO.Stream stream
    AnnotationDataFormat format

    ImportAnnotations(String, AnnotationDataFormat)

    Imports annotations into the viewer from a file in a specified data format.

    Declaration
    public void ImportAnnotations(string fileName, AnnotationDataFormat format)
    Parameters
    Type Name Description
    System.String fileName

    The full path to file which contains the annotation information.

    AnnotationDataFormat format

    The AnnotationDataFormat data format.

    ImportFormData(Byte[], DataFormat)

    Import data as byte array into a form file.

    Declaration
    public void ImportFormData(byte[] formData, DataFormat dataFormat)
    Parameters
    Type Name Description
    System.Byte[] formData

    Form data.

    DataFormat dataFormat

    The data format.

    ImportFormData(String, DataFormat)

    Import data into a form file.

    Declaration
    public void ImportFormData(string fileName, DataFormat dataFormat)
    Parameters
    Type Name Description
    System.String fileName

    Name of the file.

    DataFormat dataFormat

    Load(PdfLoadedDocument)

    Loads a pdf document in the PdfDocumentView from the specified PdfLoadedDocuemnt.

    Declaration
    public void Load(PdfLoadedDocument loadedDocument)
    Parameters
    Type Name Description
    PdfLoadedDocument loadedDocument

    The PdfLoadedDocument to be viewed in the PdfViewer

    Load(Stream)

    Loads a Pdf document in the PdfDocumentView from the stream

    Declaration
    public void Load(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream for the Pdf document to display in the pdf viewer

    Load(Stream, String)

    Declaration
    public void Load(Stream stream, string password)
    Parameters
    Type Name Description
    System.IO.Stream stream
    System.String password

    Load(String)

    Loads a Pdf document in the PdfDocumentView from the specified filepath

    Declaration
    public void Load(string filePath)
    Parameters
    Type Name Description
    System.String filePath

    The path for the Pdf document to display in the PdfDocumentView

    Load(String, String)

    Loads a Pdf document in the PdfDocumentView

    Declaration
    public void Load(string filePath, string password)
    Parameters
    Type Name Description
    System.String filePath

    The path for the Pdf document to display in the pdf viewer

    System.String password

    The password for opening the document.

    LoadAsync(PdfLoadedDocument)

    Asynchronously loads a PDF document in the PdfDocumentView control from the specified PdfLoadedDocument.

    Declaration
    public Task<bool> LoadAsync(PdfLoadedDocument loadedDocument)
    Parameters
    Type Name Description
    PdfLoadedDocument loadedDocument

    The PdfLoadedDocument to be viewed in the PdfDocumentView control

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    LoadAsync(Stream)

    Asynchronously loads a PDF document in the PdfDocumentView control from the stream

    Declaration
    public Task<bool> LoadAsync(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream for the PDF document to display in the PdfDocumentView control

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    LoadAsync(String)

    Asynchronously loads a PDF document in the PdfDocumentView control from the specified file path

    Declaration
    public Task<bool> LoadAsync(string filePath)
    Parameters
    Type Name Description
    System.String filePath

    The path for the PDF document to display in the PdfDocumentView control

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    LoadAsync(String, String)

    Asynchronously loads a PDF document in the PdfDocumentView

    Declaration
    public Task<bool> LoadAsync(string filePath, string password)
    Parameters
    Type Name Description
    System.String filePath

    The path for the PDF document to display in the PdfDocumentView control

    System.String password

    The password for opening the document.

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    OnApplyTemplate()

    Called whenever the template has been changed.

    Declaration
    public override void OnApplyTemplate()

    OnCreateAutomationPeer()

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type
    System.Windows.Automation.Peers.AutomationPeer

    Print()

    Prints the PDF document silently to the default printer without user interaction, which helps in batch printing multiple PDF files continuously.

    Declaration
    public void Print()

    Print(String)

    Prints the document on the specified printer.

    Declaration
    public void Print(string printerName)
    Parameters
    Type Name Description
    System.String printerName

    The name of the destination printer to print the PDF document.

    Print(String, PageSettings)

    Prints the PDF document silently to the specific printer's name and with page setting without user interaction.

    Declaration
    public void Print(string printerName, PageSettings pageSettings)
    Parameters
    Type Name Description
    System.String printerName

    The name of the printer to use.

    System.Drawing.Printing.PageSettings pageSettings

    The page settings that are used for all pages to be printed.

    Save(String)

    Saves the document to the specified filename.

    Declaration
    public void Save(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    ScrollTo(Double)

    Moves the window to the specified offset.

    Declaration
    public void ScrollTo(double verticalOffset)
    Parameters
    Type Name Description
    System.Double verticalOffset

    The offset, relative to the top-left corner of the current window, towards which the page should scroll.

    Remarks

    Internally, the parameters (offset values) of this method will be multiplied by current zoom factor. So, the parameters (offset values) must be specified in terms of default zoom factor of 1, or 100% zoom.

    ScrollTo(Double, Double)

    Scrolls the control to a position relative to the horizontal offset and vertical offset values.

    Declaration
    public void ScrollTo(double horizontalOffset, double verticalOffset)
    Parameters
    Type Name Description
    System.Double horizontalOffset

    The value to which the control scrolls horizontally.

    System.Double verticalOffset

    The value to which the control scrolls vertically.

    Remarks

    Internally, the parameters (offset values) of this method will be multiplied by current zoom factor. So, the parameters (offset values) must be specified in terms of default zoom factor of 1, or 100% zoom.

    SearchNextText(String)

    Search the next occurrence of the text.

    Declaration
    public void SearchNextText(string targetString)
    Parameters
    Type Name Description
    System.String targetString

    The text to be searched

    SearchNextText(String, Boolean)

    Search the next occurrence of the text.

    Declaration
    public void SearchNextText(string targetString, bool isMatchCase)
    Parameters
    Type Name Description
    System.String targetString

    The text to be searched

    System.Boolean isMatchCase

    if it is case sensitive, set to true.

    SearchPreviousText(String)

    Search the previous occurrence of the text.

    Declaration
    public void SearchPreviousText(string targetString)
    Parameters
    Type Name Description
    System.String targetString

    The text to be searched

    SearchPreviousText(String, Boolean)

    Search the previous occurrence of the text.

    Declaration
    public void SearchPreviousText(string targetString, bool isMatchCase)
    Parameters
    Type Name Description
    System.String targetString

    The text to be searched

    System.Boolean isMatchCase

    if it is case sensitive, set to true.

    SearchText(String)

    Searches the text

    Declaration
    public void SearchText(string targetText)
    Parameters
    Type Name Description
    System.String targetText

    The text to be searched

    SearchText(String, Boolean)

    Searches the text

    Declaration
    public void SearchText(string targetText, bool isMatchCase)
    Parameters
    Type Name Description
    System.String targetText

    The text to be searched

    System.Boolean isMatchCase

    if it is case sensitive, set to true.

    SelectAnnotation(String)

    Selects an annotation on a document based on its name.

    Declaration
    public bool SelectAnnotation(string annotationName)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and selected. Otherwise, it returns false.

    SelectAnnotation(String, Boolean)

    Selects an annotation on a document based on its name.

    Declaration
    public bool SelectAnnotation(string annotationName, bool bringToView)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Boolean bringToView

    if the selected annotation need to bring into view,set to true

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and selected. Otherwise, it returns false.

    SelectAnnotation(String, Int32)

    Selects an annotation on a page based on its name and the page number.

    Declaration
    public bool SelectAnnotation(string annotationName, int pageNumber)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Int32 pageNumber

    Specifes the page number on which the annotation is located. The value ranges from 1 to page count.

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and selected. Otherwise, it returns false.

    SelectAnnotation(String, Int32, Boolean)

    Selects an annotation on a page based on its name and the page number.

    Declaration
    public bool SelectAnnotation(string annotationName, int pageNumber, bool bringToView)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Int32 pageNumber

    Specifes the page number on which the annotation is located. The value ranges from 1 to page count.

    System.Boolean bringToView

    if the selected annotation need to bring into view,set to true

    Returns
    Type Description
    System.Boolean

    Returns true, if any annotation is found and selected. Otherwise, it returns false.

    ShowAnnotation(String)

    Shows a hidden annotation on a document based on its name.

    Declaration
    public bool ShowAnnotation(string annotationName)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    Returns
    Type Description
    System.Boolean

    Returns true, if any hidden annotation is shown. Otherwise, it returns false.

    ShowAnnotation(String, Int32)

    Shows a hidden annotation on a page based on its name and the page number.

    Declaration
    public bool ShowAnnotation(string annotationName, int pageNumber)
    Parameters
    Type Name Description
    System.String annotationName

    Specifies the annotation name.

    System.Int32 pageNumber

    Specifes the page number on which the annotation is located. The value ranges from 1 to page count.

    Returns
    Type Description
    System.Boolean

    Returns true, if any hidden annotation is shown. Otherwise, it returns false.

    Unload()

    Unload the unused objects in the PdfDocumentView

    Declaration
    public void Unload()

    Unload(Boolean)

    Unloads the PDF document.

    Declaration
    public void Unload(bool disposeDocument)
    Parameters
    Type Name Description
    System.Boolean disposeDocument

    Setting this parameter to true will dispose the loaded document completely. By default this parameter is set to false

    ZoomTo(Int32)

    Magnifies the page of the document to the provided zoom percentage.

    Declaration
    public void ZoomTo(int percentage)
    Parameters
    Type Name Description
    System.Int32 percentage

    Zoom percentage

    ZoomToRect(Rect)

    Zooms in on a selected area of the document to fit it into the window, and scrolls to bring it into view.

    Declaration
    public void ZoomToRect(Rect rect)
    Parameters
    Type Name Description
    System.Windows.Rect rect

    The selected rectangle area of the document

    Events

    BeginPrint

    Occurs when the print is called and before the first page of the document prints.

    Declaration
    public event EventHandler<BeginPrintEventArgs> BeginPrint
    Event Type
    Type
    System.EventHandler<BeginPrintEventArgs>

    BeginSave

    Occurs before initiating the save operation of a PDF Document.

    Declaration
    public event EventHandler<BeginSaveEventArgs> BeginSave
    Event Type
    Type
    System.EventHandler<BeginSaveEventArgs>
    See Also
    EndSave

    ContextMenuItemClickedEvent

    Occurs when a context menu item is clicked in PdfDocumentView.

    Declaration
    public event EventHandler<ContextMenuItemClickedEventArgs> ContextMenuItemClickedEvent
    Event Type
    Type
    System.EventHandler<ContextMenuItemClickedEventArgs>

    ContextMenuOpening

    Occurs before the context menu opens in PdfDocumentView.

    Declaration
    public event EventHandler<ContextMenuOpeningEventArgs> ContextMenuOpening
    Event Type
    Type
    System.EventHandler<ContextMenuOpeningEventArgs>

    CurrentPageChanged

    Occurs when the current page is changed.

    Declaration
    public event PdfDocumentView.CurrentPageChangedEventHandler CurrentPageChanged
    Event Type
    Type
    PdfDocumentView.CurrentPageChangedEventHandler

    DocumentLoaded

    Occurs when the Pdf document is loaded

    Declaration
    public event PdfDocumentView.DocumentLoadedEventHandler DocumentLoaded
    Event Type
    Type
    PdfDocumentView.DocumentLoadedEventHandler

    DocumentUnloaded

    Occurs when a PDF document is unloaded from the control.

    Declaration
    public event EventHandler<EventArgs> DocumentUnloaded
    Event Type
    Type
    System.EventHandler<System.EventArgs>
    See Also
    DocumentLoaded

    EndPrint

    Occurs when the last page of the document has printed. This event also occurs if the printing process is canceled or an exception occurs during the printing process.

    Declaration
    public event EventHandler<EndPrintEventArgs> EndPrint
    Event Type
    Type
    System.EventHandler<EndPrintEventArgs>

    EndSave

    Occurs after the completion of the save operation of a PDF Document.

    Declaration
    public event EventHandler<EndSaveEventArgs> EndSave
    Event Type
    Type
    System.EventHandler<EndSaveEventArgs>
    See Also
    BeginSave

    ErrorOccurred

    Occurs when the error occurred in PdfViewerControl

    Declaration
    public event ErrorEventHandler ErrorOccurred
    Event Type
    Type
    ErrorEventHandler

    FileLinkAnnotationClicked

    Occurs when a file link annotation is clicked.

    Declaration
    public event EventHandler<FileLinkAnnotationClickedEventArgs> FileLinkAnnotationClicked
    Event Type
    Type
    System.EventHandler<FileLinkAnnotationClickedEventArgs>

    FormFieldClicked

    Occurs when the form field is clicked.

    Declaration
    public event FormFieldClickedEventHandler FormFieldClicked
    Event Type
    Type
    FormFieldClickedEventHandler
    Remarks

    At present FormFieldClicked event is applicable only for TextBox form field.

    FreeTextAnnotationChanged

    Occurs when a free text annotation is changed.

    Declaration
    public event EventHandler<FreeTextAnnotationChangedEventArgs> FreeTextAnnotationChanged
    Event Type
    Type
    System.EventHandler<FreeTextAnnotationChangedEventArgs>

    GetDocumentPassword

    Occurs to get security password to open a password protected PDF file.

    Declaration
    public event EventHandler<GetDocumentPasswordEventArgs> GetDocumentPassword
    Event Type
    Type
    System.EventHandler<GetDocumentPasswordEventArgs>

    HandwrittenSignatureChanged

    Event that is fired when handwritten signature is changed.

    Declaration
    public event EventHandler<HandwrittenSignatureChangedEventArgs> HandwrittenSignatureChanged
    Event Type
    Type
    System.EventHandler<HandwrittenSignatureChangedEventArgs>

    HyperlinkClicked

    Occurs when a hyperlink annotation is clicked.

    Declaration
    public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked
    Event Type
    Type
    System.EventHandler<HyperlinkClickedEventArgs>

    HyperlinkMouseOver

    HyperLinkMouseOver is deprecated, please use HyperlinkMouseOver instead.

    Declaration
    public event PdfDocumentView.HyperLinkMouseOverEventHandler HyperlinkMouseOver
    Event Type
    Type
    PdfDocumentView.HyperLinkMouseOverEventHandler

    HyperLinkMouseOver

    Declaration
    [Obsolete("HyperLinkMouseOver is deprecated, please use HyperlinkMouseOver instead.")]
    public event PdfDocumentView.HyperLinkMouseOverEventHandler HyperLinkMouseOver
    Event Type
    Type
    PdfDocumentView.HyperLinkMouseOverEventHandler

    InkAnnotationChanged

    Occurs when an ink annotation is changed.

    Declaration
    public event EventHandler<InkAnnotationChangedEventArgs> InkAnnotationChanged
    Event Type
    Type
    System.EventHandler<InkAnnotationChangedEventArgs>

    NavigationButtonStatesChanged

    Occurs when the Navigation Button States is Changed

    Declaration
    public event PdfDocumentView.NavigationButtonStatesChangedEventHandler NavigationButtonStatesChanged
    Event Type
    Type
    Syncfusion.Windows.PdfViewer.PdfDocumentView.NavigationButtonStatesChangedEventHandler

    PageClicked

    Occurs when a page is clicked in PdfViewerControl

    Declaration
    public event PageClickedEventHandler PageClicked
    Event Type
    Type
    PageClickedEventHandler

    PageMouseMove

    Occurs when mouse move on a page in PdfViewerControl

    Declaration
    public event PageMouseMoveEventHandler PageMouseMove
    Event Type
    Type
    PageMouseMoveEventHandler

    PageRemoved

    Occurs when page removal takes place.

    Declaration
    public event EventHandler<PageRemovedEventArgs> PageRemoved
    Event Type
    Type
    System.EventHandler<PageRemovedEventArgs>

    PageRotated

    Occurs when page rotation takes place.

    Declaration
    public event EventHandler<PageRotatedEventArgs> PageRotated
    Event Type
    Type
    System.EventHandler<PageRotatedEventArgs>

    PrintProgress

    Occurs to provide information on how much of printing content were submitted to printing subsystem

    Declaration
    public event EventHandler<PrintProgressEventArgs> PrintProgress
    Event Type
    Type
    System.EventHandler<PrintProgressEventArgs>

    ScrollChanged

    Occurs when changes are detected to the scroll position, extent, or viewport size.

    Declaration
    public event OnScrollChangedEventHandler ScrollChanged
    Event Type
    Type
    OnScrollChangedEventHandler

    ShapeAnnotationChanged

    Occurs when a shape annotation is changed.

    Declaration
    public event EventHandler<ShapeAnnotationChangedEventArgs> ShapeAnnotationChanged
    Event Type
    Type
    System.EventHandler<ShapeAnnotationChangedEventArgs>

    StampAnnotationChanged

    Occurs when a stamp annotation is changed.

    Declaration
    public event EventHandler<StampAnnotationChangedEventArgs> StampAnnotationChanged
    Event Type
    Type
    System.EventHandler<StampAnnotationChangedEventArgs>

    StickyNoteAnnotationChanged

    Occurs when a sticky note annotation is changed.

    Declaration
    public event EventHandler<StickyNoteAnnotationChangedEventArgs> StickyNoteAnnotationChanged
    Event Type
    Type
    System.EventHandler<StickyNoteAnnotationChangedEventArgs>

    TextMarkupAnnotationChanged

    Occurs when a text markup annotation is changed.

    Declaration
    public event EventHandler<TextMarkupAnnotationChangedEventArgs> TextMarkupAnnotationChanged
    Event Type
    Type
    System.EventHandler<TextMarkupAnnotationChangedEventArgs>

    TextSelectionCompleted

    Occurs when the text selection is completed in PdfDocumentView.

    Declaration
    public event TextSelectionCompletedEventHandler TextSelectionCompleted
    Event Type
    Type
    TextSelectionCompletedEventHandler

    ZoomChanged

    Occurs when the Zoom Value is Changed

    Declaration
    public event PdfDocumentView.ZoomChangedEventHandler ZoomChanged
    Event Type
    Type
    PdfDocumentView.ZoomChangedEventHandler
    Back to top Generated by DocFX
    OSZAR »
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved
    OSZAR »