Reputation: 2729
There is a question about using Swift to get the dictionary keys from a PDF file here: How to get CGPDFDictionaryRef keys
An answer has been given, which is just one line of code, but I don't see how it fits with the original code in the question. Can anyone elaborate it?
Upvotes: 0
Views: 276
Reputation: 2729
Ah, yes, thanks. The line in the answer replaces the entire original code.
CGPDFDictionaryApplyFunction(cat, { (key, object, info) -> Void in
print("\(key), \(object), \(info)")
}, nil)
However, I'm still getting a bunch of hex digits, rather than actual data. But it's a step in the right direction.
Upvotes: 0