PdfViewer.SearchBackward

Searches the string specified in backward direction.

public void SearchBackward(string searchString, MatchOptions option)
Sub SearchBackward(searchString As String, option As MatchOptions)

Parameters

searchString
String

The string to be searched.

option
MatchOptions

The match option to use for searching.

Licensing Info

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Examples

The following example will show how to search a string in backward direction with match option.

Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer

Public Class Form1
    Inherits System.Windows.Forms.Form

    Private MyPdfViewer As PdfViewer

    Sub New()
        InitializeComponent()
    End Sub

    Private Sub InitializeComponent()
        Me.MyPdfViewer = New PdfViewer()
        Me.Controls.Add(MyPdfViewer)
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub			
    
    Private Sub Search()
        ' Searches string in backward direction.
        MyPdfViewer.SearchBackward("string", MatchOptions.WholeWordOnly)        
    End Sub

End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;

namespace DynamicPDFViewerDemo
{
    public class Form1 : Form
    {
        private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;

        public Form1()
        {
            InitializeComponent();
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }						                				

        private void InitializeComponent()
        {
            this.dpdfViewer = new PdfViewer();
            this.Controls.Add(dpdfViewer);
        }

        private void Search()
        {
            // Searches string in backward direction.
            SearchBackward("string" , MatchOptions.WholeWordOnly);
        }
    }
}

Remarks

Search starts with firing SearchProgressing event. During search, Searched event will be fired if any match is found. SearchProgressing event is fired each time with Status 'Progressing' when the search finishes the current page and moves to next page. When search completed Searched event will be fired with Status 'Completed'. If user cancels the existing search through user interface or through code by invoking a new search, then Searched event will be fired with Status 'Canceled'. Change in the search term, options, search direction or invoking a new search when current search is progressing, will result in resetting of the current search.

See Also

PdfViewer
ceTe.DynamicPDF.Viewer

In this topic