TPDFlibSearchOption
Data Types
Description
TPDFlibSearchOption defines text searching rules such as case sensitivity, word boundary matching, diacritic folding, wildcard matching, cross-line matching, canonical equivalence, grapheme-cluster boundaries and replacement style preservation.
Syntax
Delphi
type TPDFlibSearchOption = (soCaseSensitive, soWholeWord, soDiacriticInsensitive, soWildcards, soAcrossLines, soPreserveStyle, soCanonicalEquivalent, soGraphemeClusters);Values
| soCaseSensitive | The query match must respect case layout characters (uppercase and lowercase are treated as distinct). |
|---|---|
| soWholeWord | Matches the query term only if it is surrounded by non-word characters (spaces, punctuation, etc.). |
| soDiacriticInsensitive | Folds both the query and the block text through a 1:1 Unicode fold (case plus Latin/Greek/Cyrillic accent removal) before comparing, so plain letters match their accented counterparts. Combine with soCaseSensitive to keep letter case significant while accents still fold. |
| soWildcards | Treats * and ? in the query as run and single-character wildcards. |
| soAcrossLines | Lets a query span line breaks inside multi-line blocks; each break collapses to a single matchable space. |
| soPreserveStyle | Only affects SearchAndReplaceText: the replacement text inherits the hit block's text size and colour instead of the caller's current settings. |
| soCanonicalEquivalent | Normalises the query and extracted text to canonical decomposition before matching, so NFC and NFD representations compare equally while hit offsets and lengths still address the original block text. |
| soGraphemeClusters | Requires matches to begin and end on extended grapheme-cluster boundaries, protecting surrogate pairs, combining sequences, emoji ZWJ sequences, regional-indicator flags and Indic conjuncts. With soWildcards, ? consumes one complete cluster. |