• 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: Fri, 20 Jun 2008 12:53:20 -0700


On Jun 20, 2008, at 5:21 AM, Adam R. Maxwell wrote:
If you want to draw in memory, I think you have to drop down to Quartz; using PDFKit would likely be easier, but it looks like you can only specify a Quartz filter when saving to a file?.

I think there may be some confusion with regards to drawing....

Antonio is correct that PDFPage has a -[drawWithBox:] method that is used not simply for displaying to screen but also for rendering into a PDF context for saving to file as well. So, you can still use PDFPage, override -[drawWithBox:] in an app that has no intention of displaying the PDF to screen.

The saving method is in PDFDocument. When called it walks through each PDFPage in the document and calls it to render into a PDF context. (Printing within PDF Kit does something similar, BTW.) Optionally too, you can pass a QuartzFilter to the save method in PDFDocument and get, for example, grayscale output.

You can also do something similar in Quartz with CGPDFDocumentRefs and CGPDFPageRefs. The QuartzFilter stuff should work for CGContexts as well.

There is I think a perception that PDF Kit is only for displaying PDF's and I like to try to dispell that when I can. :-)

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>)

  • Prev by Date: Re: Quartz Composer file in IB
  • Next by Date: Re: hitTest question
  • Previous by thread: Re: PDFKit guidance
  • Next by thread: Re: PDFKit guidance
  • Index(es):
    • Date
    • Thread