All Projects → rorycl → rm2pdf

rorycl / rm2pdf

Licence: MIT license
Convert reMarkable tablet notebooks and annotated PDFs to layered PDF documents

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rm2pdf

rm-sync
Sync script for reMarkable paper tablet.
Stars: ✭ 74 (+39.62%)
Mutual labels:  remarkable-tablet
rmWacomToMouse
Using the pen input (wacom) of the reMarkable to move your mouse on a pc.
Stars: ✭ 46 (-13.21%)
Mutual labels:  remarkable-tablet
rM2PDF
rM2PDF script for the reMarkable reader
Stars: ✭ 23 (-56.6%)
Mutual labels:  remarkable-tablet
hackernews2remarkable
Fetch top articles from HackerNews, pack as EPUB right in your reMarkable device
Stars: ✭ 87 (+64.15%)
Mutual labels:  remarkable-tablet
reMarkable-year-week-tasks-planner
Clickable Year-Week-Tasks PDF planner for the Remarkable Tablet
Stars: ✭ 17 (-67.92%)
Mutual labels:  remarkable-tablet
instapaper-as-pdf-to-remarkable
Exports Instapaper-Articles to PDF and potentially send them to a connected remarkable tablet
Stars: ✭ 33 (-37.74%)
Mutual labels:  remarkable-tablet
remarkable-touchgestures
touch gestures for reMarkable
Stars: ✭ 43 (-18.87%)
Mutual labels:  remarkable-tablet
Koreader
An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
Stars: ✭ 9,467 (+17762.26%)
Mutual labels:  remarkable-tablet
rmrl
Render reMarkable documents to PDF
Stars: ✭ 77 (+45.28%)
Mutual labels:  remarkable-tablet
recrossable
crossword game with simplistic handwriting recognition and automatic generation of crosswords
Stars: ✭ 36 (-32.08%)
Mutual labels:  remarkable-tablet
waved
Experimental driver for the reMarkable 2 E-Ink display
Stars: ✭ 31 (-41.51%)
Mutual labels:  remarkable-tablet
plato
Document reader
Stars: ✭ 31 (-41.51%)
Mutual labels:  remarkable-tablet
ReMarkable.NET
A .NET library for developing applications for the reMarkable tablets
Stars: ✭ 37 (-30.19%)
Mutual labels:  remarkable-tablet
remarkable-custom-template-refresh
To refresh custom template manifest for reMarkable Tablet
Stars: ✭ 28 (-47.17%)
Mutual labels:  remarkable-tablet
remarkable-calendar-creator
Create calendars to display on a reMarkable device as the suspend screen or to write notes on, including events from your own online iCal calendar
Stars: ✭ 28 (-47.17%)
Mutual labels:  remarkable-tablet
reMarkable-tools
Tools for the reMarkable paper tablet
Stars: ✭ 118 (+122.64%)
Mutual labels:  remarkable-tablet
remarkable syncthing
Self-hosting syncing solution for reMarkable
Stars: ✭ 86 (+62.26%)
Mutual labels:  remarkable-tablet
fingerterm-reMarkable
A build of fingerterm, modified to draw more nicely on the reMarkable ePaper device.
Stars: ✭ 61 (+15.09%)
Mutual labels:  remarkable-tablet
Awesome Remarkable
A curated list of projects related to the reMarkable tablet
Stars: ✭ 4,111 (+7656.6%)
Mutual labels:  remarkable-tablet
remarkable-uuuflash
uuu scripts for recovery console and flashing
Stars: ✭ 31 (-41.51%)
Mutual labels:  remarkable-tablet

rm2pdf

version 0.1.6 : 22 February 2023

Convert reMarkable tablet file 'bundles' to layered PDFs, with optional per-layer colours for selected pens.

Update

rm2pdf does not support the new reMarkable v3 software format files, which produces .rm version 6 files.

This version 0.1.6 should detect the attempted processing of the new format files.

Support for the the new content metadata file format for reMarkable tablets using version 3 software is included for issue 11, however the underlying issue is the new version 6 rm files.

The status of the community work on version 6 files is set out here.

Recent releases:

  • 0.1.5 : fix for missing metadata in bundles and older rmapi zip files
  • 0.1.4 : add support for rmapi zip files
  • 0.1.3 : add embedded A4 template (needs go 1.16+)
  • 0.1.2 : support custom pen configuration, see config_example.yaml
  • 0.1.1 : allow input paths with suffixes (such as .content)
  • 0.1.0 : added support for landscape mode files
  • 0.0.3 : support for pages inserted while annotating a PDF

Examples

./rm2pdf -h

Usage:
  rm2pdf InputPath OutputFile

rm2pdf version 0.1.6

...

rm2pdf [-v] [-c red] [-c green] [-c ...]  InputPath OutputFile

Application Options:
  -v, --verbose     show verbose output
                    this presently does not do much
  -s, --settings=   path to customised pen settings file
  -t, --template=   path to a single page A4 template to use when no UUID.pdf exists
                    useful for processing sketches without a backing PDF
  -c, --colours=    colour by layer
                    use several -c flags in series to select different colours
                    e.g. -c red -c blue -c green for layers 1, 2 and 3.
                    See golang.org/x/image/colornames for the colours that can be used

Help Options:
  -h, --help        Show this help message

Arguments:
  InputPath:        input path and uuid, optionally ending in '.pdf'
  OutputFile:       output pdf file to write to

Invocation examples for annotated PDFs using the test files in testfiles:

rm2pdf testfiles/cc8313bb-5fab-4ab5-af39-46e6d4160df3.pdf output.pdf

rm2pdf -c orange -c olivegreen \
       testfiles/cc8313bb-5fab-4ab5-af39-46e6d4160df3.pdf output2.pdf

Invocation examples for reMarkable notebooks using the test files in testfiles and the A4 template in templates.

rm2pdf -c blue -c red -t templates/A4.pdf \
       testfiles/d34df12d-e72b-4939-a791-5b34b3a810e7 output4.pdf

The embedded template is used where one is not provided, so the above command is the same as

rm2pdf -c blue -c red \
       testfiles/d34df12d-e72b-4939-a791-5b34b3a810e7 output4.pdf

Details

rm2pdf requires "bundles" of files created on the reMarkable tablet, including the associated .metadata and .content files, together with the .rm binary and -metadata.json files associated with each page of reMarkable marks.

rm2pdf aims to create PDFs from both PDFs that are annotated on the reMarkable and reMarkable notebooks using these files. The latter uses an empty template PDF as the background. PDF templates can be made from the reMarkable png templates (in /usr/share/remarkable/templates) but should fit the standard 222.6264mm x 297.0000mm reMarkable output PDF size, or be A4.

Output PDFs are layered with the background PDF forming a "Background" layer and subsequent layers using the layer names created on the tablet. The layers can be turned on and off using tools provided by PDF readers such as Evince.

The pen widths and opacities provided by default are estimates. Colours, base width and opacity are set for each pen are set in rmpdf/stroke.go. Those pens with ColourOverride true will have their colour overridden by the command-line options or pen configuration yaml file. Note that at present the .rm file pressure and tilt information are not presently used.

Some PDF files, notably those created by Microsoft Word, cannot be imported reliably, causing the programme to panic. Reprocessing problem PDFs with the pdftk tool seems to fix the problem.

Note that rm2pdf has only been tested on a reMarkable v1 tablet.

Background

The project includes rmparse/rmparse.go, a remarkable tablet Go port of reMarkable tablet "lines" or ".rm" file parser, with binary decoding hints drawn from rm2svg https://github.com/reHackable/maxio/blob/master/tools/rM2svg which in turn refers to https://github.com/lschwetlick/maxio/tree/master/tools.

The project makes extensive use of the go PDF fpdf library and the contrib module gofpdi. The latter is used for including pages from existing PDF documents.

If your pdf causes fpdf to fail, resave the pdf using the pdftk programme.

Build and test

Developed with go 1.18 on 64bit Linux.

Test: go test -v ./...

Build : go build; this should produce an executable called rm2pdf.

License

This project is licensed under the MIT Licence.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].