Re: how do load PDFs without the PDFKit?
Re: how do load PDFs without the PDFKit?
- Subject: Re: how do load PDFs without the PDFKit?
- From: Douglas Davidson <email@hidden>
- Date: Wed, 28 Jun 2006 08:56:05 -0700
On Jun 28, 2006, at 8:47 AM, Scott Thompson wrote:
On Jun 28, 2006, at 10:19 AM, Alan Smith wrote:
I'm running 10.3 and so don't have the PDFKit. Obviously it is
possible to load PDFs without it because Preview has done it since
the
beginning. If possible I would like to have the ability to display
text in the same view.
I looked inside Preview's nibs but as usual with Apple apps, the most
useful part is done programmaticly.
You can read and draw PDF documents using Core Graphics. In
particular you want to create a CGPDFDocument.
In 10.3 and before, you can draw the PDF information using
CGContextDrawPDFDocument
For 10.4 and later, however, you should use the CGPDFDocument to
obtain a CGPDFPage and draw the individual pages using
CGContextDrawPDFPage
More simply, you can load and display PDFs using NSImage and
NSPDFImageRep.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden