What's needed to handle annotation viewing in

2019-09-13 10:30发布

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.

2条回答
等我变得足够好
2楼-- · 2019-09-13 10:45

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

查看更多
淡お忘
3楼-- · 2019-09-13 11:05

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.

查看更多
登录 后发表回答