Not sure if this is the same thing, but I recently ran into something similar - 
a scanned-in newspaper looked terrible and grainy in my app, although Preview 
handled it smoothly. The solution was to override -drawPage: in a PDFView 
subclass and set it to use high interpolation if anti-aliasing is turned on, as 
follows:

- (void)drawPage:(PDFPage *)pdfPage
{
    [NSGraphicsContextsaveGraphicsState];
    
    // Certain PDF files may appear very grainy (low quality) with the default 
image interpolation. If anti-aliasing is turned on, we therefore
// make interpolation high.
// NOTE: I got this fix from Skim.app's source code, so a credit to 
http://skim-app.sourceforge.net/ goes in the About box.
    [[NSGraphicsContextcurrentContext] 
setImageInterpolation:([selfshouldAntiAlias] ? NSImageInterpolationHigh: 
NSImageInterpolationDefault)];
    
    [super drawPage: pdfPage];
    [NSGraphicsContextrestoreGraphicsState];
}

(As you can see from the code comments, the developers are Skim are the ones 
who came up with the solution, not me.)

I couldn't see much difference with the PDF you placed in Dropbox, but from the 
comparison image you posted it does look like the same thing.

Hope that helps.

All the best,
Keith


      
_______________________________________________

Cocoa-dev mailing list ([email protected])

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