I suggest using blocks for implementing pdf annotations. For example, annotations can be stored in a page with the name of the corresponding pdf file. The block text itself would be the comment or a label (subpoints will not be rendered, or if comment as a thread?) and the properties of that specific block would then include (based on What Are Annotations? | PSPDFKit)
- type: /Annot
- subtype: /Highlight
- Rect: [52.9556, 728.343, 191.196, 743.218]
- C: [1.0, 1.0, 0.0]
This approach is based on the tiddlywiki philosophy that “everything is a tiddler” or in this case - a block. There are so many pros with this approach, including
- We don’t have to develop or maintain anything new, as blocks and block properties already exist. It is “merely” a question of rendering the blocks as an annotation layer. Which, of course, will be some work, but PDF.js supports annotation layer and it seems far easier than treating annotations as a “special data type” or something
- The annotation can now be treated as any other piece of information; it can be built upon or linked or filtered and the annotations are saved as accessible plain text