• 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: Threading - How its done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading - How its done?


  • Subject: Re: Threading - How its done?
  • From: John Calhoun <email@hidden>
  • Date: Tue, 6 May 2008 17:43:08 -0700

On May 6, 2008, at 4:51 PM, Karl von Moller wrote:
Does anyone know whether there is a way to get progress info from a PDF loading into a view - percentage/bytes loaded for example?

No, I can think of no way to do this.

Be careful with threading and PDF... PDFKit classes are ultimately based on CFPDFDocumentRef and CGPDFPageRef — these are not thread safe. You cannot for example search for text in a PDFDocument while rendering a PDFPage from that same PDFDocument. Or even render two different PDFPages from the PDFDocument.

You can however have several CGPDFDocumwentRefs that point to the same underlying file/data working on separate threads. You want separate PDFDocument objects though:

PDFDocument *mainPDFDocument = [[PDFDocument alloc] initWithUR: someURL];
PDFDocument *threadPDFDocument = [[PDFDocument alloc] initWithUR: someURL];


Note, same URL, different PDFDocument instance.

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: Threading - How its done?
      • From: "Adam R. Maxwell" <email@hidden>
    • Re: Threading - How its done?
      • From: Karl von Moller <email@hidden>
References: 
 >Re: Threading - How its done? (From: Army Research Lab <email@hidden>)
 >Re: Threading - How its done? (From: glenn andreas <email@hidden>)
 >Re: Threading - How its done? (From: Karl von Moller <email@hidden>)

  • Prev by Date: Re: Setting intercell spacing in NSBrowser
  • Next by Date: Re: -draggingEntered: never gets called [solved?]
  • Previous by thread: Re: Threading - How its done?
  • Next by thread: Re: Threading - How its done?
  • Index(es):
    • Date
    • Thread