Re: PDFKit guidance
Re: PDFKit guidance
- Subject: Re: PDFKit guidance
- From: "Adam R. Maxwell" <email@hidden>
- Date: Tue, 24 Jun 2008 07:15:57 -0700
On Jun 23, 2008, at 3:01 PM, John Calhoun wrote:
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;
Indeed...that QuartzFilter class sounds cool, so I just filed rdar://
problem/6030284 asking that it be documented. Prior to your post, I'd
never heard of it, Xcode's doc browser drew a blank, and google just
turned up the list of 10.5 symbol changes.
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"):
Should I file a bug asking for that key to be documented also? And
can that option be used when creating a CGPDFContext? I'm sure I'll
think of more questions :). Since the OP was trying to stay in
memory, I was avoiding the save routines.
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.
I'm feeling dumb now, but I don't see how that helps? You can insert
a subclassed PDFPage in an empty PDFDocument, but then what do you do
to use it with your PDF file?
thanks,
Adam
_______________________________________________
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