RyotaUshio / obsidian-pdf-plus

The most Obsidian-native PDF annotation, viewing & editing tool ever. Comes with optional Vim keybindings.
https://ryotaushio.github.io/obsidian-pdf-plus/
MIT License
470 stars 11 forks source link

[FR] Automatic Syncing of Annotation Contents to Linked Markdown File #182

Open Malachi-H opened 2 months ago

Malachi-H commented 2 months ago

Describe your request

Editing Annotations by right clicking on a highlight and altering the contents is clunky. It would be much more effective if the plugin was able sync the contents stored in an annotation with content next to the link to the annotation in a markdown note.

image image

This has 2 benefits:

  1. Annotations would be stored directly in the PDF file, so can be viewed outside of Obsidian.
    • e.g. Firefox PDF viewer image
  2. The "PDF++: Extract & Copy Annotations in this PDF" command would include the contents of any existing annotations created by other software.

Notes:

  1. I'm not sure how easy or even possible this is to implement, but I couldn't find anyone suggesting or rejecting it as an option.
  2. It would only work with the "Enable PDF editing" option enabled
  3. I don't know how it should function for non-block-quote styles of quotes. (block quotes make it easy to determine what is part of the annotation/quote is content, and which part if the rest of the markdown file.)
RyotaUshio commented 1 month ago

Thanks for the suggestion, in fact I also have considered this kind of feature.

Writing to PDF files is highly expensive operation, so fully automatic sync (that is, every time you type in the annotation md file, the updated content is written to the linked PDF) might not be feasible in terms of performance. But it would be possible to implement it as a command that is triggered by the user manually.

I don't know how it should function for non-block-quote styles of quotes. (block quotes make it easy to determine what is part of the annotation/quote is content, and which part if the rest of the markdown file.)

Yeah this is a nontrivial problem to solve. I want to avoid forcing specific syntax to the user as much as possible, but some restrictions will be necessary to make this happen.