You may find the Adobe official PDF Reference books handy - they are available for free download (weighing in a 9Mb) from Adobe's website. Sanface have an early development version of a PDF-lib pdf comment extractor which may help guide you in the right direction.
You may also find it useful to see how the code in the programs/scripts referenced from this article work, and see if you can 'tweak' it to extract the data instead of placing it in.
I personally have had experience of a commercial ($40k) package which converted the PDF to raw XML data, but IIRC - even that didn't cope with the annotations in the file. I think the aforementioned PDF specification is your best bet.