views:

39

answers:

2

Hey everyone, I am working on parsing the PDF content stream to be able to read and handle annotation operators and also to add these. Can anyone shed some light on how to go about doing this, without using a prebuilt library? I understand it is a daunting exercise, but any pointers would be appreciated.

Note: I've read a fair amount of the PDF Reference from Adobe, and mostly understand the concept of the file being an object tree, yet I don't understand how to go about figuring out if an annotation is there ( did i miss this operator in the reference? ) Also, any help on what the callback functions themselves should be responsible for? Thanks for your help.

+1  A: 

Look at section 3.6.2 of the PDF Reference, version 1.7. There is a "Annots" key for each Page tree node with annotations that contains an array of the annotations for that page. Each annotation points to its location on the page rather than having a page operator in the content stream.

John Lemberger
thanks, i think i missed this. will look into it.
Jesse Naugher
+1  A: 

I wrote an article on Forms and Annotations which contains some useful general description on ho they exist in the PDF file. Link is http://pdf.jpedal.org/java-pdf-blog/bid/42171/Understanding-the-PDF-file-format-interactive-elements

mark stephens