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

Notification

Icon
Error

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

Rank: Member

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

Thanks: 2 times
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:

Code:
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:
Code:
viewer.Document.Pages[pageIndex].Text.GetCharIndexAtPos(objectInArea.GetCharRect(i).left, objectInArea.GetCharRect(i).bottom, 10f, 10f);
//or
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,059

Thanks: 5 times
Was thanked: 123 time(s) in 120 post(s)
Hello,

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.