logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
Paul Rayman Posted: Tuesday, November 28, 2017 2:01:00 AM(UTC)
 
Hi,
HighlightedTextInfo is SortedDictionary where the key is a zero-based page index.

So the code that getting highlighted text may be like following
Code:

if (HighlightedTextInfo.ContainsKey(pageIndex))
{
  var textInfo = Document.Pages[pageIndex].Text.GetTextInfo(HighlightedTextInfo[pageIndex].CharIndex, HighlightedTextInfo[pageIndex].CharsCount);
  string text = textInfo.Text;
}
edwin.rafe Posted: Tuesday, November 28, 2017 1:36:50 AM(UTC)
 
Greetings everyone,

Is there a way to get the HighlightedTextInfo from an specific page?

The only method that I found is to get HighlightedTextInfo from the PdfViewer object, and that will get me the HighlightedTextInfo from the whole document.

Looping in the returned HighlightInfo objects I can get the CharIndex but it is page relative and there is no property telling me the PageIndex in the HighlightInfo.

Thank you,
Ed