AddTextMarkupFromSearchHits
הערות וקישורים חמים (hotspot links)
תיאור
Adds one text markup annotation per rectangle in Hits, turning any hit array returned by SearchText, SearchTextEach, SearchTextBatch or GetTextInAreaEx straight into markup annotations without a manual loop over AddTextMarkupAnnotation
For each hit, a rectangle whose Page is outside the document's page range or whose Right/Bottom does not exceed Left/Top is skipped. Every surviving rectangle temporarily selects the hit's page before adding the annotation; the page that was selected when the call started is always restored before returning, even for hits spanning several pages
תחביר
Delphi
Function TPDFlib.AddTextMarkupFromSearchHits(MarkupType: Integer; Const Hits: Array Of TPDFlibSearchHit): Integer;פרמטרים
| MarkupType | 1 = Highlight, 2 = Underline, 3 = Squiggly, 4 = StrikeOut |
|---|---|
| Hits | Search hits to turn into annotations, typically produced by SearchText, SearchTextEach, SearchTextBatch or GetTextInAreaEx |
ערכי החזרה
מספר ההערות שנוצרו בפועל. התאמות עם דף שמחוץ לטווח או מלבן מנוון מדולגות ואינן נספרות. מחזירה 0 בלי לשנות את בחירת הדף הנוכחית כאשר MarkupType מחוץ לטווח 1–4, לא נבחר מסמך או Hits ריק
הערות
Use HighlightTextSearchHits instead when the hits to mark up are the ones already retained by an active BeginTextSearch session. Set SearchContextChars before searching to also capture surrounding text on each hit for inspection or logging before marking it up
ראו גם
AddTextMarkupAnnotation, HighlightTextSearchHits, SearchText, SearchTextEach, SearchTextBatch, TPDFlibSearchHit