• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PDFKit guidance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: PDFKit guidance
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >Re: PDFKit guidance (From: Joel Norvell <email@hidden>)
 >Re: PDFKit guidance (From: Torsten Curdt <email@hidden>)
 >Re: PDFKit guidance (From: Antonio Nunes <email@hidden>)
 >Re: PDFKit guidance (From: Torsten Curdt <email@hidden>)
 >Re: PDFKit guidance (From: "Adam R. Maxwell" <email@hidden>)
 >Re: PDFKit guidance (From: John Calhoun <email@hidden>)
 >Re: PDFKit guidance (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: Learning SQLite by watching Core Data?
  • Next by Date: Re: Learning SQLite by watching Core Data?
  • Previous by thread: Re: PDFKit guidance
  • Next by thread: Re: PDFKit guidance
  • Index(es):
    • Date
    • Thread