{"id":22268815,"url":"https://github.com/rorycl/rm2pdf","last_synced_at":"2025-09-01T03:12:21.229Z","repository":{"id":44673255,"uuid":"232194102","full_name":"rorycl/rm2pdf","owner":"rorycl","description":"Convert reMarkable tablet notebooks and annotated PDFs to layered PDF documents","archived":false,"fork":false,"pushed_at":"2025-04-07T13:45:03.000Z","size":2948,"stargazers_count":80,"open_issues_count":1,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T18:18:40.040Z","etag":null,"topics":["annotated-pdfs","remarkable-notebooks","remarkable-tablet"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rorycl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-06T22:07:30.000Z","updated_at":"2025-04-07T13:45:07.000Z","dependencies_parsed_at":"2023-11-15T10:35:24.588Z","dependency_job_id":"db273274-8851-436a-9f90-678209d7ed4a","html_url":"https://github.com/rorycl/rm2pdf","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorycl%2Frm2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorycl%2Frm2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorycl%2Frm2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorycl%2Frm2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rorycl","download_url":"https://codeload.github.com/rorycl/rm2pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085325,"owners_count":21045139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotated-pdfs","remarkable-notebooks","remarkable-tablet"],"created_at":"2024-12-03T11:14:00.770Z","updated_at":"2025-04-09T18:18:44.785Z","avatar_url":"https://github.com/rorycl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rm2pdf\n\nversion 0.1.7 : 26 December 2024\n\nConvert reMarkable tablet file 'bundles' to layered PDFs, with optional\nper-layer colours for selected pens.\n\n## Update\n\n`rm2pdf` does not support the new reMarkable v3 software format files,\nwhich produces `.rm` version 6 files.\n\nVersion 0.1.6 should detect the attempted processing of the new format\nfiles. Version 0.1.7 is a small security fix.\n\nSupport for the the new `content` metadata file format for reMarkable\ntablets using version 3 software is included for [issue\n11](https://github.com/rorycl/rm2pdf/issues/11), however the underlying\nissue is the new version 6 rm files.\n\nThe status of the community work on version 6 files is set out\n[here](https://www.reddit.com/r/RemarkableTablet/comments/10hxe3j/updates_regarding_reverse_engineering_remarkable/).\n\nRecent releases:\n* 0.1.5 : fix for missing metadata in bundles and older rmapi zip files\n* 0.1.4 : add support for rmapi zip files\n* 0.1.3 : add embedded A4 template (needs go 1.16+)\n* 0.1.2 : support custom pen configuration, see `config_example.yaml`\n* 0.1.1 : allow input paths with suffixes (such as `.content`)\n* 0.1.0 : added support for landscape mode files\n* 0.0.3 : support for pages inserted while annotating a PDF\n\n## Examples\n\n```\n./rm2pdf -h\n\nUsage:\n  rm2pdf InputPath OutputFile\n\nrm2pdf version 0.1.7\n\n...\n\nrm2pdf [-v] [-c red] [-c green] [-c ...]  InputPath OutputFile\n\nApplication Options:\n  -v, --verbose     show verbose output\n                    this presently does not do much\n  -s, --settings=   path to customised pen settings file\n  -t, --template=   path to a single page A4 template to use when no UUID.pdf exists\n                    useful for processing sketches without a backing PDF\n  -c, --colours=    colour by layer\n                    use several -c flags in series to select different colours\n                    e.g. -c red -c blue -c green for layers 1, 2 and 3.\n                    See golang.org/x/image/colornames for the colours that can be used\n\nHelp Options:\n  -h, --help        Show this help message\n\nArguments:\n  InputPath:        input path and uuid, optionally ending in '.pdf'\n  OutputFile:       output pdf file to write to\n\n```\n\nInvocation examples for annotated PDFs using the test files in `testfiles`:\n\n```\nrm2pdf testfiles/cc8313bb-5fab-4ab5-af39-46e6d4160df3.pdf output.pdf\n\nrm2pdf -c orange -c olivegreen \\\n       testfiles/cc8313bb-5fab-4ab5-af39-46e6d4160df3.pdf output2.pdf\n```\n\nInvocation examples for reMarkable notebooks using the test files in `testfiles`\nand the A4 template in `templates`.\n\n```\nrm2pdf -c blue -c red -t templates/A4.pdf \\\n       testfiles/d34df12d-e72b-4939-a791-5b34b3a810e7 output4.pdf\n\n```\n\nThe embedded template is used where one is not provided, so the above command is\nthe same as\n\n```\nrm2pdf -c blue -c red \\\n       testfiles/d34df12d-e72b-4939-a791-5b34b3a810e7 output4.pdf\n```\n\n## Details\n\nrm2pdf requires \"bundles\" of files created on the reMarkable tablet, including\nthe associated `.metadata` and `.content` files, together with the `.rm` binary\nand `-metadata.json` files associated with each page of reMarkable marks.\n\nrm2pdf aims to create PDFs from both PDFs that are annotated on the reMarkable\nand reMarkable notebooks using these files. The latter uses an empty template\nPDF as the background. PDF templates can be made from the reMarkable png\ntemplates (in /usr/share/remarkable/templates) but should fit the standard\n222.6264mm x 297.0000mm reMarkable output PDF size, or be A4.\n\nOutput PDFs are layered with the background PDF forming a \"Background\" layer and\nsubsequent layers using the layer names created on the tablet. The layers can be\nturned on and off using tools provided by PDF readers such as Evince.\n\nThe pen widths and opacities provided by default are estimates. Colours, base\nwidth and opacity are set for each pen are set in rmpdf/stroke.go. Those pens\nwith ColourOverride true will have their colour overridden by the command-line\noptions or pen configuration yaml file. Note that at present the .rm file\npressure and tilt information are not presently used. \n\nSome PDF files, notably those created by Microsoft Word, cannot be imported\nreliably, causing the programme to panic. Reprocessing problem PDFs with the\n`pdftk` tool seems to fix the problem.\n\nNote that rm2pdf has only been tested on a reMarkable v1 tablet.\n\n## Background\n\nThe project includes rmparse/rmparse.go, a remarkable tablet Go port of\nreMarkable tablet \"lines\" or \".rm\" file parser, with binary decoding hints drawn\nfrom rm2svg https://github.com/reHackable/maxio/blob/master/tools/rM2svg which\nin turn refers to https://github.com/lschwetlick/maxio/tree/master/tools.\n\nThe project makes extensive use of the go PDF `fpdf` library and the contrib\nmodule `gofpdi`. The latter is used for including pages from existing PDF\ndocuments.\n\nIf your pdf causes fpdf to fail, resave the pdf using the `pdftk`\nprogramme.\n\n### Build and test\n\nDeveloped with go 1.18 on 64bit Linux.\n\nTest:  `go test -v ./...`\n\nBuild : `go build`; this should produce an executable called `rm2pdf`.\n\n## License\n\nThis project is licensed under the [MIT Licence](LICENCE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorycl%2Frm2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frorycl%2Frm2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorycl%2Frm2pdf/lists"}