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
NYCU(NCTU)-差勤-助教

NCTU-TA-fill 填寫 差勤-助教時數 有沒有覺得在差勤系統填助教時數有點浪費生命? 今天有個懶鬼浪費好多時間幫大家寫了code 只要填好的必要的資料,就可以讓電腦自動幫你完成差勤助教的時數填寫喔! https://pt-attendance.nctu.edu.tw/verify/userL

14 Dec 21, 2021
Easily Generate Revolut Business Cards

RevBusinessCardGen Easily Generate Revolut Business Cards Prerequisites Before you begin, ensure you have met the following requirements: You have ins

Younes™ 35 Dec 14, 2022
Python library for Minitel communication through serial port

Python library for Minitel communication through serial port

Noël 3 Aug 14, 2022
Render to print for blender 2.9+

render_to_print_blender_addon ** render2print: Blender AddOn for Blender 2.90.0+ ** Calculates camera parameters to allow printing a rendered image to

5 Nov 19, 2021
SysCFG R/W Utility written in Swift

MagicCFG SysCFG R/W Utility written in Swift MagicCFG is one of our first, successful applications that we launched last year. The app makes it possib

Jan Fabel 82 Aug 08, 2022
Unified Distributed Execution

Unified Distributed Execution The framework supports multiple execution backends: Ray, Dask, MPI and MultiProcessing. To run tests you need to install

17 Dec 25, 2022
Acesse seus investimentos da NuInvest pelo Python (Experimental)

Acesse seus investimentos da NuInvest pelo Python (Experimental)

André Roggeri Campos 5 Dec 06, 2022
Daily knowledge pills to get better in Python.

Python daily pills Daily knowledge pills to get better Python code. Why Does your Python code suffers of any of this symptoms? Incorrect Indentation I

Jeferson Vaz dos Santos 35 Sep 19, 2022
Python 3 script for installing kali tools on your linux machine

Python 3 script for installing kali tools on your linux machine

gh0st 2 Apr 20, 2022
A clock purely made with python(turtle)...

Clock A clock purely made with python(turtle)... Requirements Pythone3 IDE or any other IDE Installation Clone this repository Running Open this proje

Abhyush 1 Jan 11, 2022
pgvector support for Python

pgvector-python pgvector support for Python Great for online recommendations 🎉 Supports Django, SQLAlchemy, Psycopg 2, Psycopg 3, and asyncpg Install

Andrew Kane 37 Dec 20, 2022
In this project we will be using OpenCV to virtually drag a rectangle and drop it at a different location. It will be further used for Virtual Mouse.

Virtual Drag & Drog using OpenCV In this project we will be using OpenCV to virtually drag a rectangle and drop it at a different location. It will be

Hassan Shahzad 5 Sep 27, 2021
A self contained invitation management system for gatekeeping.

Invitease Description A self contained invitation management system for gatekeeping. Purpose Serves as a focal point for inviting guests to a venue pr

מעגן מיכאל 7 Jul 19, 2022
Purge all transformation orientations addon for Blender 2.8 and newer versions

CTO Purge This add-on adds a new button to Blender's Transformation Orientation panel which empowers the user to purge all of his/her custom transform

MMMrqs 10 Dec 29, 2022
Script to automate the scanning of "old printed photos"

photoscanner Script to automate the scanning of "old printed photos" Just run: ./scan_photos.py The script is prepared to be run by fades. Otherw

Facundo Batista 2 Jan 21, 2022
Simple tools for the Horse Reality webgame

Realtools (Web Tools for Horse Reality) These tools were made on request from a close friend of mine who plays this game. A live instance can be found

shay 0 Sep 06, 2022
Delayed iteration for polling and retries.

Does Python need yet another retry / poll library? It needs at least one that isn't coupled to decorators and functions. Decorators prevent the caller

A. Coady 22 Dec 29, 2022
IEEE ITU bunyesinde komitelere verilen Python3 egitiminin dokumanlastirilmis versiyonlari bu repository altinda tutulmaktadir.

IEEE ITU Python Egitimi Nasil Faydalanmaliyim? Dersleri izledikten sonra dokumanlardaki kodlari yorum satirlari isaretlerini kaldirarak deneyebilirsin

İTÜ IEEE Student Branch 47 Sep 04, 2022
ARK sõidueksami Matrixi bot

ARK Sõidueksami bot Küsib ARK-i lehelt uusimad eksami ajad ja saadab sõnumi Matrixi kanali Dev setup Linux python3 -m venv venv source venv/bin/activa

Arti Zirk 3 Jun 15, 2021
Discord's own Dumbass made for shits n' Gigs!

FWB3 Discord's own Dumbass made for shits n' Gigs! Please note: This bot is made to be stupid and funny, If you want to get into bot development you'r

1 Dec 06, 2021