Re: text selection for pdfview
Re: text selection for pdfview
- Subject: Re: text selection for pdfview
- From: Ronny Reichmann <email@hidden>
- Date: Thu, 21 Dec 2006 11:57:20 +0100
I was wrong, that's not easy. I didn't found a method that returns
the selection as a range. Maybe you could use
»selectionForWordAtPoint:« in PDFPage. But it will probably be bad
design, if you examine every point of the selection rect. Maybe just
examining the points at the border of the rect? And then comparing it
with the return value of »selectionForRect:«, by keeping focus on the
first and the last word in a line?
Am 21.12.2006 um 11:26 schrieb Ronny Reichmann:
You could examine the selection / detect words that are not
selected at whole. That should be easy.
Am 21.12.2006 um 10:27 schrieb David Chan:
Hi everyone,
I am currently using pdfview and I am trying to emulate the function
in adobe acrobat where user can drag a rectangle over the text and
have all the text inside the rect selected. I tried to use
selectionForRect function to get the pdfselection.
However, I notice that this function will only select the part of the
words that is inside the rect. If my rect only cover the part "sam"
from the word "sample", then only "sam" will be selected. This is
different from adobe's behavior where the whole word will be selected
as long as one of its character is inside the rect.
So.. my question is.. is there any workaround for this so that I
could
easily select all the words that are inside or partially inside the
rect? Thank you very much for your kind attention.
Regards,
David
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden