According to Apple's documentation
CGPDFDocument
has a var called documentAttributes
:
var documentAttributes: [AnyHashable : Any]? { get set }
I'm having trouble seeing how to use this to either get, or set document attributes of a PDF in Swift. Xcode doesn't offer it as an auto-completion following a dot, e.g. myPDF.documentAttributes
.
How do you use it? I'm trying to get/set the document metadata such as Author, Creator, Subject.