Re: Performance Issue with Drawing PDFPages on NSView
Re: Performance Issue with Drawing PDFPages on NSView
- Subject: Re: Performance Issue with Drawing PDFPages on NSView
- From: John Calhoun <email@hidden>
- Date: Wed, 26 Aug 2009 12:15:15 -0700
On Aug 26, 2009, at 4:20 AM, Naresh Kongara wrote:
I'm drawing the pages from the pdf document onto an NSVIew. The
fallowing method draws all the pages from the document in a View,
this method will be called from the view's drawrect. Its taking
much time when there are more than 40 pages as all the pages needs
to be displayed at a time .
Is there any other way of doing it ? or How can increase the
performance..?
Don't go from PDFPage -> data -> NSImage. PDFPage has -[PDFPage
drawWithBox:] method. Call that directly. It always draws at 100%
though so you will have to set up a transform within [NSView
drawRect:] in order to scale/position the page correctly.
That should make a significant performance difference....
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