On Jun 24, 2008, at 7:15 AM, Adam R. Maxwell wrote:
On Jun 23, 2008, at 3:01 PM, John Calhoun wrote:
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.

The key is "documented" in PDFDocument.h.  :-)

Yes, you can apply the QuartzFilter to a CGPDFContext with the - [applyToContext:] call listed above. And, yes, they should better document QuartzFilters ... they're nice.

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?

Well, in a very crude fashion you can still accomplish what it is I think you;re trying to accomplish. You're subclassed PDFPage's could, on Tiger, render a regular PDFPage. It's gross but what I'm describing is basically having two parallel PDFDocuments — one created from a file or data ([PDFDocument initWithURL:] or [PDFDocument initWithData:]) and the other empty PDFDocument you create with - [init]. For each page in the former document you create a new PDFPageSubclass object and add it to the empty document. Your subclass does the various scaling/filtering in it's draw method and calls it's doppleganger PDFPage to render.

So I said it was gross....

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