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



Go to last post Go to first unread
#1 Posted : Wednesday, September 28, 2022 6:53:31 PM(UTC)

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 19
Location: Rio de Janeiro

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I'm trying to highlight some text selected by its object (programmatically).
I'm doing the following to get with chars that will be highlighted:

viewer.Document.Pages[pageIndex].Text.GetCharIndexAtPos(objectInArea.GetCharRect(i).left, objectInArea.GetCharRect(i).bottom, 0f, 0f);

I've already tried some variations as the following:
viewer.Document.Pages[pageIndex].Text.GetCharIndexAtPos(objectInArea.GetCharRect(i).left, objectInArea.GetCharRect(i).bottom, 10f, 10f);
viewer.Document.Pages[pageIndex].Text.GetCharIndexAtPos(objectInArea.GetCharRect(i).left + objectInArea.GetCharRect(i).width/3, objectInArea.GetCharRect(i).bottom + objectInArea.GetCharRect(i).height/3, 10f, 10f);

The chars in black (PAINEL 2) are the ones I'm trying to get the indexes patagamesOverlap.png (63kb) downloaded 0 time(s).
Is there a way to get their index 100% of the time?
Paul Rayman  
#2 Posted : Tuesday, November 1, 2022 9:07:17 PM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,094

Thanks: 7 times
Was thanked: 128 time(s) in 125 post(s)

The question is NOT entirely clear. Is this text not accessible through the Text property?
Perhaps these are annotations, in which case get it through the page.Annotations collection.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.