• 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: Parsing PDF Content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing PDF Content


  • Subject: Re: Parsing PDF Content
  • From: David Duncan <email@hidden>
  • Date: Wed, 10 Jan 2007 11:06:00 -0800

On Jan 10, 2007, at 10:38 AM, John Goodman wrote:

Everything is fine, but now I want to fold the code into an existing C++ application. I would like to have a pointer to a C++ object passed to the callback.

I see that Apple's callback has an "void *info" parameter. The documentation describes the pointer as "A pointer to data passed to the callback."

I could use the "void *info" parameter to pass a "this" pointer, but I don't see any way for me to set up this value. Can I set the pointer value myself? If so, how?

You set the "info" parameter when you create the scanner (via CGPDFScannerCreate). Just pass "this" for the info parameter, then type cast the void* back to your C++ class pointer and use it.


PS: This is not really the best list for questions about Core Graphics APIs without a Cocoa context - you should use the Quartz Dev list instead.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Parsing PDF Content
      • From: John Goodman <email@hidden>
References: 
 >Parsing PDF Content (From: John Goodman <email@hidden>)

  • Prev by Date: Re: Parsing PDF Content
  • Next by Date: Re: Parsing PDF Content
  • Previous by thread: Re: Parsing PDF Content
  • Next by thread: Re: Parsing PDF Content
  • Index(es):
    • Date
    • Thread