Re: PDFKit guidance
Re: PDFKit guidance
- Subject: Re: PDFKit guidance
- From: John Calhoun <email@hidden>
- Date: Mon, 23 Jun 2008 15:01:34 -0700
On Jun 21, 2008, at 6:34 PM, Adam R. Maxwell wrote:
I appreciated Antonio's (and your) reminder :). If I understand
correctly, the OP could create a PDF context with
kCGPDFXDestinationOutputProfile set to a grayscale profile
QuartzFilters make all that a lot simpler. You would create a
QuartzFilter that does grayscale (look at ColorSync Utility for
examples and how to create them). The load the QuartzFilter with:
+ (QuartzFilter*) quartzFilterWithURL:(NSURL*) aURL;
You can then either apply it to a context (in your PDFPage subclass)
with:
- (BOOL) applyToContext:(CGContextRef) aContext;
Or better still, pass it in the options dictionary to one of
PDFDocument's save routines (key == @"QuartzFilter"):
- (BOOL) writeToFile: (NSString *) path withOptions:
(NSDictionary *) options;
Subclassing PDFPage apparently requires 10.5, also, unless I'm
missing something.
Not strictly speaking. You can subclass PDFPage in 10.4 but you will
not be able to get PDFDocument to create instances of your subclass
when handed a PDF file (i.e. through -[PDFDocument initWithURL:]).
You can however still create an empty PDFDocument on 10.4 and -
insertPage your subclassed PDFPage.
QuartzFilters though were only introduced in 10.5....
John Calhoun—_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden