• 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: Performance Issue with Drawing PDFPages on NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Performance Issue with Drawing PDFPages on NSView (From: Naresh Kongara <email@hidden>)

  • Prev by Date: Re: F-Script 2.0 available
  • Next by Date: Re: F-Script 2.0 available
  • Previous by thread: Performance Issue with Drawing PDFPages on NSView
  • Next by thread: How to create GPS enabled Iphone application?
  • Index(es):
    • Date
    • Thread