Re: PDFSelection question
Re: PDFSelection question
- Subject: Re: PDFSelection question
- From: John Calhoun <email@hidden>
- Date: Mon, 7 Jun 2010 12:17:35 -0700
On Jun 5, 2010, at 12:26 PM, Matthew Weinstein wrote:
> I think I must be missing some simple method in the api to do this, but, given a range of a PDFDocument string, how do I convert that to a selection? I found the PDFPage selection from range, but how do I find what pages a selection for the document string covers?
I may not understand your question.... PDFDocument's don't really contain a string for the entire document — it is created by concatenating the strings from each page (with a <CR> between them.
Generally, the API uses PDFSelections — for example if the user selects text in the PDFView -[PDFView currentSelection] returns that as a PDFSelection. If you search a PDFDocument the results returned are PDFSelections. Using PDFSelections allows you to query the pages covered by the selection (-[PDFSelection pages]).
Perhaps there is something else you are attempting to do though.
John Calhoun—_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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