PDF Viewer Customizing in C#.NET
KetticPDF Viewer Control contains convenient C# API of the KetticPDFViewerElement for the users to customize the control to their Windows Forms application. There are various methods available to the users to perform the customization of PDFViewer control, for example, the Page methods, the scrolling methods, the selection methods and the search methods. In the following tutorial, we are going through the process of implement these methods of PDFViewer control for C#.NET applications.
Customize Page Methods of PDFViewer Control
There are the PageUp, PageDown, GoToPage methods available to the users to customize the navigation of PDF document. The C# code below demonstrates how to implement these methods.
Furthermore, the KetticPDFViewer WinForms control offers the Scrolling method to set the scrolling position and scroll the PDF view with a specified offset. In addition, there is a ScrollingTo method available to scroll the PDF view to an exact position in the PDFViewer. The C# code below demonstrates how to customize these methods. Set Text Selection for PDFViewer Component
To customize the text of a PDF document, we are able to use the several text methods below in the C# API of KetticPDFViewerElement to set the text selection, including the SelectAll method, the DeselectAll method, and the Select method. The C# code below demonstrates how to use these text selection methods.
In addition, there are several methods in the C# API for getting the text currently selected, including the GetSelectedText, GetSelectedTextAsync, and Copy methods. The KetticPDFViewer control uses the GetSelectedTextAsync method to get the text currently selected asynchronously and call the specified callback function and uses the Copy method to copy the current selection to the clipboard. The C# code sample below demonstrates how to use these methods.
KetticPDFViewer also offers methods to search text in a PDF document, such as the Find, FindPrevious, and SearchResult methods. The Find method is able to search text forwards, the FindPrevious method can search text backwards, and the SearchResult method can return the search result. The C# code sample below demonstrates how to use these methods. Context Menu Customizing in KetticPDFViewer Control
KetticPDFViewer control contains a default context menu for the users to fast perform a set of commands. It also supports custom menu by changing the KetticContextMenu property of the KetticPDFViewer control for Windows Forms. The simple C# code snippet below shows how to set the context menu property.
In addition, there is a DisplayMenu method available to display the context menu using C# code at a specific position. The C# code below demonstrates the specification.
Build Hyperlinks in PDF Document using KetticPDFViewer
KetticPDFViewer WinForms control includes an AnnotationClicked C# event for the users to customize the hyperlinks in a PDF document. The Annotations created by the event actually are hyperlinks and can lead the users to an external web page or to a different place in the document. The C# code below shows how to use the AnnotationClicked event. |
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlGet Started in C#Programatically ManipulateKeyboard and Mouse SupportPrinting SupportWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |