views:

195

answers:

1

Assuming I have extracted the CGPDFDictionaryRef from a PDF document using the iPhone SDK, how do I get the document's title from the dictionary? More generally, how can I get a list of the keywords for that dictionary? In theory I could ask the customer, but surely there must be some canonical keywords? Is there a list somewhere?

Update: I found this link which gives the common keys. To answer my own question, you can look these up directly in the dictionary returned by CGPDFDocumentGetInfo(pdfDocumentRef).

+1  A: 

The dictionary key you're looking for is kCGPDFContextTitle.

Here's your list of keys.

Edit: I'm not sure. I haven't actually used CGPDF -- was just giving an educated guess based on how other Apple frameworks work.

Shaggy Frog
Thanks! I'll accept the answer if you can help me with the follow-up question too. (See above.)
Amagrammer
Actually, those are not the correct keys. Nice try though.
Amagrammer