Saving a PDF Selection or converting it to an NSRange and back
Saving a PDF Selection or converting it to an NSRange and back
- Subject: Saving a PDF Selection or converting it to an NSRange and back
- From: Keith Blount <email@hidden>
- Date: Wed, 11 Feb 2009 12:44:06 -0800 (PST)
Hi,
The subject line says it all, really, I need to save a PDFSelection between sessions in my program, but there seems no way of doing this. A similar question came up on these last year but there was no solution:
http://www.cocoabuilder.com/archive/message/cocoa/2008/5/16/206893
(Or at least I couldn't get the one proposed solution to work well, as it doesn't account for selections that span multiple pages.)
The reason I'm trying to do this, incidentally, is that I'm trying to use PDFView's -setHighlightedSelections: to add quick and easy PDF highlighting to my app. The PDF file itself doesn't necessarily need to save this highlighting (although of course that would be better, I don't think that's possible going the -setHighlightedSelections: route), as it would be embedded in my app so my app could save the ranges - except that PDFSelection doesn't support encoding, and there is no obvious way to convert PDFSelections to NSRanges and back again, unfortunately.
Of course, if there is a better way of implementing PDF highlighting that I'm missing, please feel free to tell me point me in the direction of what I have overlooked. I have looked at the docs, the samples and searched the net before posting, though.
Many thanks in advance and all the best,
Keith
_______________________________________________
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