GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / SearchText Method





In This Topic
SearchText Method (GdViewer)
In This Topic
Searches for an occurrence of a given text expression within the defined page of the document displayed in the GdViewer control according to the specified parameters and highlights the result or returns its coordinates. You can select either the Ordinal or the InvariantCulture comparison when searching.
Overload List
OverloadDescription
Searches for and highlights an occurrence of a given text expression within the current page of the document displayed in the GdViewer control according to the parameters you have specified. If the format of the displayed document is other than supported text-based formats, which currently are DOCX, TXT, RTF and PDF, the method will fail.

This method uses InvariantCulture comparison when searching. It means, that characters are comparing using culture-sensitive sort rules and the invariant culture, in other words this method respects accents when searching.

Please, be aware that this method changes highlighted regions or the rectangle of area selection depending on the Occurrence parameter as follows:

  1. The currently defined highlighted regions, if present, changes to the regions identified by all occurrences of the found text, if you search for all of them. You can use the RemoveAllRegions method before starting new search to ensure the previously defined regions will remove.
  2. The current rectangle of area selection changes to the text found if you search for the specific occurrence. You can identify it using the IsRect method or you can clear the previous rectangle's data using the ClearRect method.

 
Searches for and highlights an occurrence of a given text expression within the current page of the document displayed in the GdViewer control according to the parameters you have specified. If the format of the displayed document is other than supported text-based formats, which currently are DOCX, TXT, RTF and PDF, the method will fail.

This method uses InvariantCulture comparison when searching. It means, that characters are comparing using culture-sensitive sort rules and the invariant culture, in other words this method respects accents when searching.

Please, be aware that this method changes highlighted regions or the rectangle of area selection depending on the Occurrence parameter as follows:

  1. The currently defined highlighted regions, if present, changes to the regions identified by all occurrences of the found text, if you search for all of them. You can use the RemoveAllRegions method before starting new search to ensure the previously defined regions will remove.
  2. The current rectangle of area selection changes to the text found if you search for the specific occurrence. You can identify it using the IsRect method or you can clear the previous rectangle's data using the ClearRect method.

 
Searches for an occurrence of a given text expression within the defined page of the document displayed in the GdViewer control according to the parameters you have specified. This method returns the bounding box (rectangle) surrounding the searched expression on the required page defined by its top left coordinates and by its width and height in inches, if the expression has been found. This occurrence is not highlighted using this method.

This method uses InvariantCulture comparison when searching. It means, that characters are comparing using culture-sensitive sort rules and the invariant culture, in other words this method respects accents when searching.

 
Searches for an occurrence of a given text expression within the defined page of the document displayed in the GdViewer control according to the parameters you have specified. This method returns the bounding box (rectangle) surrounding the searched expression on the required page defined by its top left coordinates and by its width and height in inches, if the expression has been found. This occurrence is not highlighted using this method.

This method uses InvariantCulture comparison when searching. It means, that characters are comparing using culture-sensitive sort rules and the invariant culture, in other words this method respects accents when searching.

 
Searches for and highlights an occurrence of a given text expression within the current page of the document displayed in the GdViewer control according to the parameters you have specified. If the format of the displayed document is other than supported text-based formats, which currently are DOCX, TXT, RTF and PDF, the method will fail.

You can benefit from selecting the comparison option using this method, in other words, you can search respecting accents or not in the given text expression.

Please, be aware that this method changes highlighted regions or the rectangle of area selection depending on the Occurrence parameter as follows:

  1. The currently defined highlighted regions, if present, changes to the regions identified by all occurrences of the found text, if you search for all of them. You can use the RemoveAllRegions method before starting new search to ensure the previously defined regions will remove.
  2. The current rectangle of area selection changes to the text found if you search for the specific occurrence. You can identify it using the IsRect method or you can clear the previous rectangle's data using the ClearRect method.

 
Searches for an occurrence of a given text expression within the defined page of the document displayed in the GdViewer control according to the parameters you have specified. This method returns the bounding box (rectangle) surrounding the searched expression on the required page defined by its top left coordinates and by its width and height in inches, if the expression has been found. This occurrence is not highlighted using this method.

You can benefit from selecting the comparison option using this method, in other words, you can search respecting accents or not in the given text expression.

 
See Also