1

I'm trying to get the catalog of a PDF document but I cannot find CGPDFDocumentGetCatalog. Is it unbound or am I just blind?

poupou
  • 43,413
  • 6
  • 77
  • 174
Krumelur
  • 32,180
  • 27
  • 124
  • 263

1 Answers1

0

MonoTouch.CoreGraphics.CGPDFDocument::GetCatalog() is the binding of CGPDFDocumentGetCatalog, see github.

However I only added this recently so you'll need MonoTouch 4.1 (or more recent) or add p/invoke directly into your code.

poupou
  • 43,413
  • 6
  • 77
  • 174
  • I'll get 4.1. Do you know if there is some easy way to implement text selection in PDFs, read annotations and add annotations using MT? Maybe a free library? – Krumelur Aug 31 '11 at 13:21
  • I have not tried that myself but there are Q&A here on SO about annotations, e.g. http://stackoverflow.com/questions/5352090/how-to-get-pdf-annotations-when-i-touch-on-ipad-screen so the CodeGraphics API provided by iOS looks sufficient for (at least) that purpose. – poupou Aug 31 '11 at 13:26
  • Thanks. Back then some of the methods were not bound in MT. But if you have added them now, I should be happy! :-) – Krumelur Aug 31 '11 at 13:32
  • I am only missing the starting point in CGPDFDictionary. All methods in there want a "key" but I cannot find anything to enumerate all keys or to get the root key or to apply a function to the dictionary's content as done here http://stackoverflow.com/questions/2556344/create-a-table-of-contents-from-a-pdf-file with CGPDFDictionaryApplyFunction. – Krumelur Aug 31 '11 at 13:43
  • We're abusing SO comments system ;-) since this is unrelated to the original question. Please add additional questions and I (or anyone else) will answer them, time permitting :-) – poupou Aug 31 '11 at 13:51