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 (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 arch...@mail-archive.com