Q:

Local html or pdf file in Cocoa

I need to open a local (not on the web) html file or a pdf file in Cocoa, but not in iOS.  I can find lots examples that use UIKit, but haven't found a complete set of code ideas that use WebKit.  Can someone please help by pointing me in the right direction or offering some ideas on how todo this. 

A:

I appreciate the suggestions on this question. 
Following is the code that I used 
- (void)windowDidLoad
{
    [super windowDidLoad];

    NSString* filePath = [[NSBundle mainBundle]
                          pathForResource:@"myDocumentText"
                          ofType:@"pdf"]; 
    NSURL* fileURL = [NSURL fileURLWithPath:filePath];
    NSURLRequest* request = [NSURLRequest requestWithURL:fileURL];
    [[myWebView mainFrame] loadRequest:request];   

}

