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

Notification

Icon
Error

Options
Go to last post Go to first unread
lidds  
#1 Posted : Wednesday, August 2, 2017 6:37:41 AM(UTC)
lidds

Rank: Newbie

Groups: Registered
Joined: 8/2/2017(UTC)
Posts: 2
United Kingdom
Location: Reading

Is there a way that I am able to select text and copy to clipboard that is within a predefined area.

e.g. if I had a rectangle xmin = 10, ymin = 10 and xmax = 100, ymax = 100 it would get all text within this area?

Thanks in advance

Simon
Paul Rayman  
#2 Posted : Wednesday, August 2, 2017 7:05:48 AM(UTC)
Paul Rayman

Rank: Administration

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

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Please look at GetBoundedText method

Code:

var lefttop = viewer1.ClientToPage(viewer1.CurrentIndex, new Point(x, y));
var rightbottom = viewer1.ClientToPage(viewer1.CurrentIndex, new Point(x + width, y + height));
string text = viewer1.CurrentPage.Text.GetBoundedText(lefttop.X, lefttop.Y, rightbottom.X, rightbottom.Y);
Users browsing this topic
Guest (2)
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.