On May 5, 2008, at 7:17 PM, Karl von Moller wrote:
-(void)openPDFandCreatePreview:(id)sender
{
        //[progressOutlet setUsesThreadedAnimation:YES];
        NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
        [progressOutlet startAnimation:nil];
        NSPDFImageRep  *pdfRep;
        NSImage      *pdfImage;
pdfRep = [NSPDFImageRep imageRepWithContentsOfFile: finalStringOutput];
        pdfImage = [[[NSImage alloc] init] autorelease];
        [pdfImage addRepresentation: pdfRep];
        [imageWellOutlet setImage:pdfImage];
        PDFDocument     *pdfDoc;
        
pdfDoc = [[[PDFDocument alloc] initWithURL: [NSURL fileURLWithPath: finalStringOutput]] autorelease];
        [pdfOutlet setDocument:pdfDoc];
        [progressOutlet stopAnimation:nil];
        [pool release];
        return;
}


If there is another way to load a PDF into a PDF view using Multithreading techniques that is easier to understand please let me know! Any help with this would be much appreciated.

I'm not exactly following the above....

Why the mix of NSImage and PDFDocument? You seem to be creating the PDF twice (at least the first page).

Are mutliple threads trying to share a single PDFView? I know that wll break....

John Calhoun—_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to