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

Persistence of annotation edits #210

Open
Cimbali opened this issue Oct 5, 2021 · 2 comments
Open

Persistence of annotation edits #210

Cimbali opened this issue Oct 5, 2021 · 2 comments

Comments

@Cimbali
Copy link
Owner

Cimbali commented Oct 5, 2021

So now #86 is done, we still have the issue that re-compiling a PDF with modified annotations will remove all annotations.

I haven’t worked out how to circumvent this:

  • Notes are stored as regular PDF annotations in the file (and thus also viewable and editable with other PDF editors)
  • I’m not keen on having a metadata file next to the PDF
  • However, beamer can not re-import notes when re-compiling a file, and adding a ton of \pdffreetextcomment is a bit of a hassle

Right now I’m thinking of saving the file as-is with a hardlink to filename.pdf -> .filename-annotated.pdf (or somehow hidden in a platform-specific way), or maybe in ~/.cache or something. That could allow a) to detect when the file is re-generated and b) to reload the notes modifications.

However it still doesn’t seem ideal, there’s going to be a lot of guess work. Should we re-import all notes? What if the slides have a new frame or if pages are moved around? Would it be better to simply allow to re-export PDF comments in LaTeX source format?

@ZvikaZ
Copy link

ZvikaZ commented Jan 17, 2023

Maybe you can add export and import commands. Thus, the user will be able to export all the comments (to JSON/XML/whatever suits you...), then the user will import them back after recompilation.

It also has the added benefit that the user can keep the notes as some textual file, know that they are backed up regardless of the pdf changes, and maybe handle them with git.

@Cimbali
Copy link
Owner Author

Cimbali commented Jan 17, 2023

I think you’re right, a text and user-readable format is probably best. Import/export and an optional auto-export on modify should cover all use cases.

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

2 participants