2

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 using
CGPDFDictionaryRef 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.

D4ttatraya
  • 3,344
  • 1
  • 28
  • 50
Mahesh
  • 662
  • 2
  • 11
  • 30

1 Answers1

3

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.

steipete
  • 7,581
  • 5
  • 47
  • 81
  • Hi, I saw PDF demo video at link u have provided, but in annotation you did only web link. Can we do notes on PDF? – Mahesh Jul 16 '12 at 14:28
  • Ya, I am going through your Demo For any difficulty I will contact you. Thank You. – Mahesh Jul 16 '12 at 14:45
  • @steipete Can you help me? I need to implement underline and highlight feature in a pdf(user will select the location by touch) also user notes and comments. But i am not able to get any lead – Girish Nair Aug 10 '13 at 04:30
  • @girish-nair We're working on this for over two years now, it's a hard problem. Making text selectable is one hard part, saving the annotations another one. I can't imagine a way where it would be cheaper to reinvent the wheel than licensing our technology. – steipete Aug 10 '13 at 09:02