lucasrla / remarks

Extract annotations (highlights and scribbles) from PDF, EPUB, and notebooks marked with reMarkable tablets. Export to Markdown, PDF, PNG, SVG
GNU General Public License v3.0
353 stars 20 forks source link

Add support for converting PDFs to Remarkable bundles #51

Closed apoorvkh closed 1 year ago

apoorvkh commented 2 years ago

I am very interested in having a program that converts your PDF and annotations into the remarkable bundle format. I believe a solution exists for PDFs to RM, but none that supports annotations. In fact, something with this capability (being able to convert a "remarkable bundle" into a PDF and PDF to "remarkable bundle") would create the possibility for having bidirectional syncing, which would be very useful.

For this case, one must use the same annotation formats (and PDF parser) for both types of conversions. Then, we would be able to make comparisons between annotated files. I propose the following:

RM to PDF:

PDF to RM:

I think this an important feature to have and would help make the open-source remarkable pipeline more feature-complete. Hopefully, this approach could be a decent starting point. I think remarks is the best "RM to PDF" codebase and, as you are most familiar with it, it would be fantastic if you could consider adding support for this or letting me know your thoughts. Thanks so much for your consideration!

lucasrla commented 2 years ago

Interesting idea. Couple of quick thoughts:

  1. You haven't listed them explicitly but the JSON-based "smart" highlights might be the easiest way to starting building the PDF-to-bundle part. Those JSON files seem easy to create from scratch. Personally, I sometimes highlight PDFs on macOS Preview, so I could see the value of having my Preview highlights also available within the reMarkable tablet.

  2. Apart from the reMarkable device, what are the other relevant ways remarks users (current or future) draw scribbles on documents? Would it be drawing with a mouse on something like macOS Preview (or Adobe Acrobat)? Maybe something with iPad + Apple Pencil? Knowing more about the nature of the scribbles to be written to RM files (and having actual examples to compare against) would be very helpful to define the scope of such a feature.

  3. The RM parsing (coupled with some of the drawing) of remarks' codebase is messy. They were the very first parts that I quickly put together and I haven't touched them in years... They would certainly need some love (a complete rewrite?!) if we were to extend/build upon them.

In any case, happy to consider PRs related to your idea. Just let us know what you think!

Thanks