Rank: Newbie
Groups: Registered
Joined: 9/21/2017(UTC) Posts: 3
Thanks: 1 times
|
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
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
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;
}
Edited by user Tuesday, November 28, 2017 2:02:29 AM(UTC)
| Reason: Not specified
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
|
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close