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:
checking if ${id$}.pdf exists and using it as background.pdf instead of performing template conversion
ensuring that transparency is preserved by using the pdftk argument multistamp instead of multipage
Stripping redundant .pdf suffix if it already exists in $filename
Optionally allowing for colored annotations by an additional rMsvg argument --coloured_annotations or simply -c
Passing these (and any other additional) arguments from exportNotebook to rMsvg
(Fixing some PEP8 in rMsvg)
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.
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:${id$}.pdf
exists and using it asbackground.pdf
instead of performing template conversionmultistamp
instead ofmultipage
.pdf
suffix if it already exists in$filename
--coloured_annotations
or simply-c
exportNotebook
torMsvg
Examples
Small help message if no argument is provided
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.pdfCustom behavior
Calling
exportNotebook remarkable -c
creates the following: remarkable-c.pdfCurrent 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.