What's needed to handle annotation viewing in a PDF?

萝らか妹 提交于 2020-01-06 14:50:10

问题


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:


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.




回答2:


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



来源:https://stackoverflow.com/questions/3449944/whats-needed-to-handle-annotation-viewing-in-a-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!