Re: PDFView
Re: PDFView
- Subject: Re: PDFView
- From: Ricky Sharp <email@hidden>
- Date: Tue, 4 Apr 2006 17:51:57 -0500
On Apr 4, 2006, at 5:38 PM, John Caccavale wrote:
I have an app that I wrote that contains a PDF view to display a
PDF. I also have built in the ability to find text on the PDF.
However, I can't seem to figure out how to get it so that when a
string has been matched it zooms and centers the selection or
string that was matched. Thanks for the help
What code are you using to perform the search? Assuming you're using
findString:withOptions:, you'll end up with an array of PDFSelection
objects. For an individual object, you could then use boundsForPage:
to get a bounding rect of that selection for a particular page
(you'll have to deal with how to handle a selection spanning across
pages).
When you say zoom, what exactly do you mean? e.g. are you wanting to
set the zoom such that the width or height of the selection's
bounding box is the width or height of your document window? I
suppose you could just do the math with the page bounding box along
with the found selection's bounding box.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >PDFView (From: John Caccavale <email@hidden>) |