• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PDFSelection question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >PDFSelection question (From: Matthew Weinstein <email@hidden>)

  • Prev by Date: Problem with setting a cursor
  • Next by Date: Re: Notification of window visible?
  • Previous by thread: PDFSelection question
  • Next by thread: NSData Question... could be a bit odd
  • Index(es):
    • Date
    • Thread