Is there any way to create PDF objects (e.g. a PDF-dictionary with parameters that are needed by a custom PDF producer/consumer/viewer) with CGPDF<...> or do I have to write my own parser and create new trailers, xref etc. in order to add new objects to the PDF? As I understand it, CG translates all drawing calls of its graphics context into the correct PDF counterparts when creating a PDF - but I have custom data/objects (e.g. for annotations, threads etc.) that should be stored in the PDF but that obviously can't be automatically created by CG.
I can only find all these getters
Getting Data from a Dictionary
CGPDFDictionaryGetArray
CGPDFDictionaryGetBoolean
CGPDFDictionaryGetCount
CGPDFDictionaryGetDictionary
CGPDFDictionaryGetInteger
CGPDFDictionaryGetName
CGPDFDictionaryGetNumber
CGPDFDictionaryGetObject
CGPDFDictionaryGetStream
CGPDFDictionaryGetString
Any help would be appreciated ?
And by the way - does anyone know some links where I can find out what one can achieve in the real world with this function and its callback.
CGPDFDictionaryApplyFunction
CGPDFDictionaryApplierFunction
Maybe a sample application to see it in action?
Thx in advance
There are no setters. The CGPDF API is read only.
The CGPDFDictionaryApplyFunction simply lets you enumerate the entries in a dictionary object. The PDFKitten framework uses this function in a few places if you want to see real world usage.