FROM : Laurent Cerveau
DATE : Sat May 17 15:13:55 2008
On May 16, 2008, at 9:40 PM, John Calhoun wrote:
> On May 15, 2008, at 11:43 PM, Laurent Cerveau wrote:
>> If I have a PDF View , select part of it and get the
>> currentSelection, showing it tells something like
>> Page index = 2, Range = (0, 21]
>>
>> However I do not see where I could get the range of the
>> PDFSelection and later recreate a selection with this value
>
> Not the range, but you can get the bounds for each page the
> selection covers: -[PDFSelection boundsForPage: (PDFPage *) page].
>
> To "unflatten" you can call [PDFPage selectionForRect:] for each
> partial selection you saved off. Selections can be added then
> [PDFSelection addSelection: (PDFSelection *) selection].
>
> Yeah, a little hacky....
Indeed this is ....and it fails. When I call
PDFSelection *aSel = [aPage selectionForRect:aRec];
the PDFKit returns me empty selection
More to dig ...
Many Thanks
laurent
DATE : Sat May 17 15:13:55 2008
On May 16, 2008, at 9:40 PM, John Calhoun wrote:
> On May 15, 2008, at 11:43 PM, Laurent Cerveau wrote:
>> If I have a PDF View , select part of it and get the
>> currentSelection, showing it tells something like
>> Page index = 2, Range = (0, 21]
>>
>> However I do not see where I could get the range of the
>> PDFSelection and later recreate a selection with this value
>
> Not the range, but you can get the bounds for each page the
> selection covers: -[PDFSelection boundsForPage: (PDFPage *) page].
>
> To "unflatten" you can call [PDFPage selectionForRect:] for each
> partial selection you saved off. Selections can be added then
> [PDFSelection addSelection: (PDFSelection *) selection].
>
> Yeah, a little hacky....
Indeed this is ....and it fails. When I call
PDFSelection *aSel = [aPage selectionForRect:aRec];
the PDFKit returns me empty selection
More to dig ...
Many Thanks
laurent
| Related mails | Author | Date |
|---|---|---|
| Laurent Cerveau | May 16, 08:43 | |
| Antonio Nunes | May 16, 09:11 | |
| John Calhoun | May 16, 21:40 | |
| Laurent Cerveau | May 17, 15:13 | |
| Laurent Cerveau | May 17, 15:13 | |
| Antonio Nunes | May 17, 18:57 | |
| Laurent Cerveau | May 17, 21:10 |






Cocoa mail archive

