Skip to main content

rmrl: reMarkable Rendering Library

rmrl is a Python library for rendering reMarkable documents to PDF files. It takes the original PDF document and the files describing your annotations, combining them to produce a document close to what reMarkable itself would output.

Demo

The same notebook was rendered to a PDF via the reMarkable app and rmrl. The resultant PDF files were converted to PNGs with ImageMagick at 300 dpi.

reMarkable output rmrl output
reMarkable rmrl

The biggest differences are the lack of texture in the pencils and paintbrush, which we hope to address in the future. Two differences are intentional:

  • The highlight color is more saturated, since we feel the default color is too subtle.
  • The grid lines from the template are less saturated, to better reflect the appearance on the device. This is configurable.

Installation

rmrl requires Python 3.7 or later. If that's installed, the easiest installation is to do a

pip install rmrl

Alternatively, you may clone this repository. Poetry is used for development, so once that is installed you can run

poetry install

to get a virtual environment all set up.

Usage

The main interface to rmrl is through a single function:

from rmrl import render

output = render(source)

source may be:

  • The filename of a zip file containing the document.
  • The filename of any (root-level) file from an unpacked document.
  • Any object that provides open() and exists() methods. See rmrl/sources.py for more details on this API.

The output is a filestream with the contents of the PDF file.

The render function takes the following keyword arguments:

  • progress_cb: A callback function to be called periodically during the rendering process. It will be called with a single argument, a number from 0 to 100 indicating the progress. This function can abort the process by raising an exception.

Command-line Usage

rmrl may be called as a command-line tool. Once it has been installed, run

python -m rmrl filename

to convert filename to an annotated PDF. The default output is to stdout. Use

python -m rmrl -h

to see all of the options.

Templates

rmrl can use the reMarkable templates as a background when rendering notebooks. We cannot ship copies of these templates. You may be allowed to copy them from your own reMarkable device on to your computer for personal use. If this is legal in your jurisdiction, you may connect your device to your computer by the USB cable and run

python -m rmrl.load_templates

This will copy these templates to ~/.local/share/rmrl/templates (assuming default XDG settings).

History

rmrl derives from the reMarkable Connection Utility, by Davis Remmel. RCU is a full-featured GUI for managing all aspects of a reMarkable device. Do check it out if you are looking for a stand-alone solution for getting documents on and off of your device.

RCU was chosen as a base for rmrl due to its high-quality rendering. The following are the major changes:

  • rmrl is designed as a library, for incorporation into other programs. RCU is designed as a stand-alone program.
  • rmrl uses the pure-Python ReportLab Toolkit for rendering PDF files. RCU uses the Qt framework, which is a significantly heavier installation.
  • rmrl only supports vector output, while RCU offers both raster and vector rendering.
  • RCU supports PDF layers (Optional Content Groups). At this point, rmrl does not.
  • RCU can add PDF annotations corresponding to highlights. At this point, rmrl does not.

Trademarks

reMarkable(R) is a registered trademark of reMarkable AS. rmrl is not affiliated with, or endorsed by, reMarkable AS. The use of “reMarkable” in this work refers to the company’s e-paper tablet product(s).

Copyright (C) 2020 Davis Remmel

Copyright 2021 Robert Schroll

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Metadata

Release files for rmrl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rmrl 0.2.1
File Size Uploaded Provenance Actions
rmrl-0.2.1.tar.gz 365.3 kB Without provenance Details for rmrl-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rmrl 0.2.1
File Interpreter ABI Platform Actions
rmrl-0.2.1-py3-none-any.whl Python 3 none any Details for rmrl-0.2.1-py3-none-any.whl

Total release size: 884.7 kB

Release files / rmrl-0.2.1.tar.gz

Download URL rmrl-0.2.1.tar.gz
Size 365.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c532bef4168350e6ab17cf37c6481dc12b6a78e007c073503f082f36215b71c9
BLAKE2b-256 checksum
How to use checksums
d19d9555822307171519569e0d326dae389244f7d18fe671cba4fcde726aa591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.3 Linux/5.4.51-v7+

Release files / rmrl-0.2.1-py3-none-any.whl

Download URL rmrl-0.2.1-py3-none-any.whl
Size 519.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c35b9f20494a6034a16e916d7351575efb3e3f77acabe9094453a7f6013eaa86
BLAKE2b-256 checksum
How to use checksums
445aae44b8b62e07771e6d6ed9cea933895822058a6254a48ab75482a8164883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.3 Linux/5.4.51-v7+

Security for rmrl 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page