Render reMarkable documents to PDF

Overview

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

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/.

Owner
Robert Schroll
Robert Schroll
Bu repoda python ile CAN-Bus çalışmalarını nasıl gerçekleyeceğiniz anlatılmaktadır.

CAN-Bus-with-Python "CAN Bus 1980'li yıllarda Robert BOSCH tarafından geliştirilmiş bir iletişim protokoldür. Hızlı ve hata oranının çok düşük olması

Yunus Emre Coşkun 16 Aug 29, 2022
People tracker on the Internet: OSINT analysis and research tool by Jose Pino

trape (stable) v2.0 People tracker on the Internet: Learn to track the world, to avoid being traced. Trape is an OSINT analysis and research tool, whi

Jose Pino 7.3k Dec 30, 2022
Python scripts to interact with Upper Deck ePack online trading card platform

This script should connect to the Upper Deck ePack API using your browser cookies and download a list of your current collection and save it as a CSV.

Adrian Kent 1 Nov 22, 2021
Este projeto se trata de uma análise de campanhas de marketing de uma empresa que vende acessórios para veículos.

Marketing Campaigns Este projeto se trata de uma análise de campanhas de marketing de uma empresa que vende acessórios para veículos. 1. Problema A em

Bibiana Prevedello 1 Jan 12, 2022
This collection is to provide an easier way to interact with Juniper

Ansible Collection - cremsburg.apstra Overview The goal of this collection is to provide an easier way to interact with Juniper's Apstra solution. Whi

Calvin Remsburg 1 Jan 18, 2022
An implementation of multimap with per-item expiration backed up by Redis.

MultiMapWithTTL An implementation of multimap with per-item expiration backed up by Redis. Documentation: https://loggi.github.io/python-multimapwitht

Loggi 2 Jan 17, 2022
This is a spamming selfbot that has custom spammed message and @everyone spam.

This is a spamming selfbot that has custom spammed message and @everyone spam.

astro1212 1 Jul 31, 2022
Fortnite StW Claimer for Daily Rewards, Research Points and free Llamas.

Fortnite Save the World Daily Reward, Research Points & free Llama Claimer This program allows you to claim Save the World Daily Reward, Research Poin

PRO100KatYT 27 Dec 22, 2022
Here You will Find CodeChef Challenge Solutions

Here You will Find CodeChef Challenge Solutions

kanishk kashyap 1 Sep 03, 2022
Design-by-contract in Python3 with informative violation messages and inheritance

icontract icontract provides design-by-contract to Python3 with informative violation messages and inheritance. It also gives a base for a flourishing

275 Jan 02, 2023
An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Kevin 1 Oct 27, 2021
Minimalistic Gridworld Environment (MiniGrid)

Minimalistic Gridworld Environment (MiniGrid) There are other gridworld Gym environments out there, but this one is designed to be particularly simple

Maxime Chevalier-Boisvert 1.7k Jan 03, 2023
EDF R&D implementation of ISO 15118-20 FDIS.

EDF R&D implementation of ISO 15118-20 FDIS ============ This project implements the ISO 15118-20 using Python. Supported features: DC Bidirectional P

30 Dec 29, 2022
banking system with python, beginner friendly, preadvanced level

banking-system-python banking system with python, beginner friendly, preadvanced level Used topics Functions else/if/elif dicts methods parameters hol

Razi Falah 1 Feb 03, 2022
The Python Achievements Framework!

Pychievements: The Python Achievements Framework! Pychievements is a framework for creating and tracking achievements within a Python application. It

Brian 114 Jul 21, 2022
This is a simple web interface for SimplyTranslate

SimplyTranslate Web This is a simple web interface for SimplyTranslate List of Instances You can find a list of instances here: SimplyTranslate Projec

4 Dec 14, 2022
Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies

pyshader Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies Fully programmable shader model (even

Alastair Cota 1 Jan 11, 2022
thonny plugin for gitonic

thonny-gitonic thonny plugin for gitonic open gitonic in thonny by pressing Control+Shift+g, or via tools menu press ESC key to minimize gitonic windo

karl 1 Apr 12, 2022
Easy way to build a SaaS application using Python and Dash

EasySaaS This project will be attempt to make a great starting point for your next big business as easy and efficent as possible. This project will cr

xianhu 3 Nov 17, 2022
My collection of mini-projects in various languages

Mini-Projects My collection of mini-projects in various languages About: This repository consists of a number of small projects. Most of these "mini-p

Siddhant Attavar 1 Jul 11, 2022