I am doing PDF based application for iPad. It supports thumbnail view, Free hand comment, And annotations (Notes). Ya and I searched lot on net but I didnt find any relevant answer for making annotation on PDF using Quartz 2d.
We can get PDF page info usingCGPDFDictionaryRef CGPDFPageGetDictionary ( CGPDFPageRef page );
And using Annots
key.bool CGPDFDictionaryGetArray ( CGPDFDictionaryRef dict, "Annots", CGPDFArrayRef *value );
you can get annotation for particular page. If I am right what is key for Notes and if it is there how to update page dictionary.
If i am wrong at all in above concern please let me know how Notes gets rendered on PDF. Or where PDF renderer gets info about Notes.?
Please let me know If any one knows ASAP. Really thanks in advance.
I'm currently implementing annotations my framework. Apple doesn't evaluate the "Annots" dictionary AT ALL - so you're on your own.
I basically re-implemented all popular annotation types, how they are drawn, and wrote my own parser that creates the objects out of the Annots dictionary of each CGPDFPage. Then you draw them after you let QuartzCore draw the default pdf page.
To get all keys (Notes, and much more), check out Adobe's PDF Reference. It's quite a read (>1000 pages).
I'm not allowed to name the framework I am working on, so click on my profile instead to see the link.
来源:https://stackoverflow.com/questions/11505782/annotation-notes-comments-using-quartz-2d-in-ios