I have an object of type CGPDFDictionaryRef
returned somehow from a method that is considered as a part of a static library (so I do not have access to its code to modify it), however, I want to know the name of the PDF file that this dictionary object holds ? how can I query it to get the name of the file?
There are two functions that take a CGPDFDocumentRef
and return a CGPDFDictionaryRef
. They are CGPDFDocumentGetInfo
and CGPDFDocumentGetCatalog
. Neither function returns a dictionary that contains the name of the original file. Neither does the array returned by CGPDFDocumentGetID
.
This makes sense, because you can create a CGPDFDocumentRef
without a file, from data you get over a socket or by drawing into a CGPDFContext
with Quartz 2D.
If you want the name of the file, you'll have to get it some other way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With