reHackable / maxio

Companion daemon for the reMarkable™ paper tablet
GNU Lesser General Public License v3.0
155 stars 52 forks source link

Support for document annotations #7

Closed florian-wagner closed 6 years ago

florian-wagner commented 6 years ago

exportNotebook works great for handwritten notes, but not for annotations made within a document pdf. In such cases one currently get's a blank PDF with annotations only, i.e. without the underlying document. This PR changes this by:

Examples

Small help message if no argument is provided

$ ~ exportNotebook           
Usage: ./exportNotebook (Partial)NotebookName AdditionalrM2svgArguments
You can additionally append the -c argument for coloured annotations.

Normal behavior

Calling exportNotebook remarkable works as expected, i.e. uses the underlying pdf as the background and not a succesion of Blank templates: remarkable.pdf

Custom behavior

Calling exportNotebook remarkable -c creates the following: remarkable-c.pdf

Current limitations

If the PDF was cropped, the annotations are shifted. I haven't figured out where the crop information is stored and how the foreground.pdf can be transformed accordingly. Anyone has an idea?

Please consider merging. It think this could be of value for a lot of users who use the remarkable to annotate academic PDFs.

edupont commented 6 years ago

Thanks a lot !