jkcl
jkcl

Reputation: 2206

Hyperlinks not working in PDFView (in my cocoa app)

I have a PDFView object in one of my windows and wondering if there's anything special I need to do in order for the hyperlinks to work.

The same pdf files have working hyperlinks when opened in other apps (like skim, preview, etc).

Any ideas?

Upvotes: 1

Views: 321

Answers (2)

jkcl
jkcl

Reputation: 2206

Turned out that I simply had to enable this in my derived class: [super mouseDown:theEvent];

Upvotes: 0

Stefanf
Stefanf

Reputation: 1693

Add a delegate to your PDFView that responds to this selector

- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)url
{
   [[NSWorkspace sharedWorkspace] openURL:url];
}

Upvotes: 1

Related Questions