Bug 10916 - Please add binding for CGPDFDocumentGetInfo
Summary: Please add binding for CGPDFDocumentGetInfo
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2013-03-05 12:22 UTC by Paul Auman
Modified: 2013-03-05 16:41 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Paul Auman 2013-03-05 12:22:00 UTC
Missing Binding for CGPDFDocumentGetInfo

Gets the information dictionary for a PDF document.

CGPDFDictionaryRef CGPDFDocumentGetInfo (
   CGPDFDocumentRef document
The document whose dictionary you want to obtain.
Return Value
The information dictionary for the document.

Available in iOS 2.0 and later.
Declared In

Comment 1 Sebastien Pouliot 2013-03-05 15:44:20 UTC
Good catch, it will be added for the next version (but it's too late for 6.2.1).

Let me know if this is blocking you - it's only a few lines of code that you can add in your application.
Comment 2 Sebastien Pouliot 2013-03-05 16:14:28 UTC
Fixed in maccore/master: cd577d54f58b290cfa3cb292d619d86ca0aab64b
Unit test added in master: a74322724d1cd3905b24d7842b5c5a31d4b8ef10
Comment 3 Paul Auman 2013-03-05 16:35:57 UTC
Thank you. Tried a couple different ways to pull it out of the PDFstream, no luck. If you have a chance please post the code to call it directly, it would be most helpful.


Comment 4 Sebastien Pouliot 2013-03-05 16:41:56 UTC
That's the commit:


Something like this should work in your app:

[DllImport ("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics")]
extern static IntPtr CGPDFDocumentGetInfo (IntPtr handle);

public CGPDFDictionary GetInfo (CGPDFDocument doc)
   return new CGPDFDictionary (CGPDFDocumentGetInfo (doc.Handle));