Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export notes from org to pdf annotations #27

Open
ghost opened this issue Jun 17, 2018 · 12 comments
Open

Export notes from org to pdf annotations #27

ghost opened this issue Jun 17, 2018 · 12 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2018

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
Copy link
Owner

weirdNox commented Jun 18, 2018

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
Copy link
Author

ghost commented Jun 18, 2018

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

@ghost
Copy link
Author

ghost commented Jun 18, 2018

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
Copy link
Owner

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

  • How would we associate the notes with each annotation? The second time we export we would need a way to know which notes were created, deleted or updated in order to keep the document from having duplicate annotations
  • After exporting, we would lose the hierarchy of the notes, so I don't really know a way to import it from the annotations... it would be flattened which is probably not what we want.

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
Copy link
Contributor

et2010 commented Jun 20, 2018

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
Copy link
Owner

weirdNox commented Jun 20, 2018

@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
Copy link
Author

ghost commented Jun 20, 2018

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
Copy link

mankoff commented Jun 26, 2018

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
Copy link

mankoff commented Jun 26, 2018

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

@igoralmeida
Copy link

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
Copy link

tdehaeze commented Apr 16, 2020

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

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

@fuxialexander
Copy link
Contributor

fuxialexander commented Apr 18, 2020

One way Org Noter -> PDF is now in fuxialexander/org-pdftools@a7915dd

tarsius pushed a commit to emacsmirror/org-noter that referenced this issue May 31, 2023
…ndow-location

`M-T` now toggles the notes window location between "horizontal" and "vertical"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants