weirdNox / org-noter

Emacs document annotator, using Org-mode
GNU General Public License v3.0
1.07k stars 101 forks source link

Export notes from org to pdf annotations #27

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm a new org-noter user, and really enjoying it so far. I like writing the localized notes in org mode corresponding to various locations in the PDF.

On the other hand, I don't want to be stuck in org either -- I'd love to automatically insert my notes as annotations into the appropriate location in the PDF. This would be especially useful for when I want to annotate a PDF and review it on another device, or share it with somebody else.

Is there any chance this would be possible? I'd love to hear your thoughts. Thanks!

weirdNox commented 6 years ago

Yes, I think this should be possible with pdf-tools, as it has a way to add annotations to the PDF.

The only problem would be that all things related to org-mode (inline latex, babel...) would stop working, as you probably expect!

Also, this probably should create a new PDF instead of modifying the original, no?

ghost commented 6 years ago

Modifying in-place vs making a new document might be a customization variable.

ghost commented 6 years ago

There is another workflow that I think would be very cool, but might be too different from the org-noter vision (I'm not sure):

I'd like to modify the annotations in place, live, so that when I open the PDF in another application, the annotations are all visible and editable. I could take notes in an org buffer, then move to a tablet PDF reader and edit the notes, then continue editing them in org later.

Perhaps the annotations in the PDF could be combined in a single notes window as indirect buffers. This could then be exported if desired into a standalone org file. Multifiles might be a useful tool here.

weirdNox commented 6 years ago

Hm... these last days I was thinking about this and thought about 2 potential problems:

Maybe with some markup we could workaround these issues... Like having a property on the notes which says which notes were already updated and to which annotations IDs, and on the document we could add some information to the annotations that would relate them to the notes.

et2010 commented 6 years ago

I like the idea of two way synchronizing, but it's tricky to do it right, especially when the annotation extraction is not reliable enough -- sometimes only part of the highlighted text is extracted. I think a simpler approach is to keep all your annotations in your notes file and keep both your PDF documents and notes in your Dropbox and synchronize it everywhere. It takes no effort to open my PDF to get to my notes and vice versa. Correct me if I'm wrong!

weirdNox commented 6 years ago

@et2010, I agree that synchronizing both things is trivial and it is what I do (I have notes files that are associated with 70 PDFs each, and everything is kept in sync with Syncthing). However, I must admit that I always use my desktop or laptop to work, so I never use a tablet or phone to see anything. I can see why it may be useful to insert the notes into the PDF and edit them there.

sometimes only part of the highlighted text is extracted

I don't think the suggestion was in relation to highlights but more about text notes (@apnewberry, is this correct?). I think he suggested that the notes should be exported to the PDF as those "post-it" annotations, and then he would be able to edit them with a usual PDF viewer.

I think the idea is great, with some non-trivial implementation details. Nevertheless, I probably will give priority to #15 as it is something I will use more.

ghost commented 6 years ago

I don't think the suggestion was in relation to highlights but more about text notes (@apnewberry, is this correct?). I think he suggested that the notes should be exported to the PDF as those "post-it" annotations, and then he would be able to edit them with a usual PDF viewer.

Exactly right.

mankoff commented 6 years ago

PDFs can have files embedded (attached). One way to deal with the two-way sync issues is to export the notes for this PDF and attach them in some Org-noter desired format. Then also embed the notes as traditional PDF markup. If you want to sync changes made to the PDF elsewhere, you could extract all of the PDF markup, generate the Org noter file, diff this with the Org-noter that is attached, and then merge changes, or if there is a conflict, let the user deal with it using standard git/magit protocols for merging conflicts.

mankoff commented 6 years ago

Also, just one way Org Noter -> PDF would be very useful for sending marked-up PDFs to colleagues.

igoralmeida commented 4 years ago

Also, just one way Org Noter -> PDF would be very useful for sending marked-up PDFs to colleagues.

This would be a very useful addition and a good way to start tackling this issue.

tdehaeze commented 4 years ago

It seems it is a long term goal of https://github.com/fuxialexander/org-pdftools

Planed features: (Long-term) Org <-> PDF Annotation converter.

fuxialexander commented 4 years ago

One way Org Noter -> PDF is now in https://github.com/fuxialexander/org-pdftools/commit/a7915ddda3735aad0fd62a5b974da104943e94a2