rmfakecloud icon indicating copy to clipboard operation
rmfakecloud copied to clipboard

.RM V6 Support

Open joagonca opened this issue 1 month ago • 10 comments

  • Supports rendering reMarkable v6 files w/ colour and all pen types, including text.
  • Rendering is supported in Go, using go-cairo to produce the PDF contents (implementation in this library: https://github.com/joagonca/rmc-go). Highly based on rmscene, with added functionality (like colour support).
  • Ability to export/download to PDF the .RM file.
  • [CAVEAT] For now it only supports rendering the first page.

Trying to address issue #255 .

joagonca avatar Oct 29 '25 14:10 joagonca

Awesome work @joagonca 🥳 However, am I doing something wrong? It always shows just one page and it's not deterministic which one is rendered...

baflo avatar Oct 31 '25 10:10 baflo

Thanks! That is correct, it's a limitation of the current integration. There is already support for a multipage render on the library, but I wanted to keep this initial PR simple (just v6 support).

The "randomness", I intend to fix that, and support all pages in a subsequent PR. The rmc-go library already exports the multipage PDF using the .content files from reMarkable, in the correct order.

joagonca avatar Oct 31 '25 11:10 joagonca

It should now support multipage rendering in the correct order. Still one caveat: some pages might appear cropped (I'm calculating the PDF page size based on the first .rm file).

@baflo

joagonca avatar Nov 03 '25 10:11 joagonca

@joagonca I actually came up with a solution myself, too. I looks quite similar to yours, but it stitches the single pages together with unipdf, so all pages maintain their original size. Maybe it is of help to you:

https://github.com/baflo/rmfakecloud/commit/15de3ca2e98fbee14c5db7e024be529be2b070cf#diff-fc741d1c044272840de20d525e88fb8068c4737e42703b589317c2f981502d12

baflo avatar Nov 03 '25 11:11 baflo

@baflo Nice one. For the sake of this PR, it might make more sense to go with yours, as it provides best functionality out of the box.

For the final one, I might ditch go-cairo and go with unipdf in the library. That way the whole packaging will use just one Go PDF renderer, and we'd remove the cgo requirement.

Thoughts?

joagonca avatar Nov 03 '25 11:11 joagonca

Sound good to me ;)

@ddvk what do you think?

baflo avatar Nov 03 '25 12:11 baflo

nice work!

unipdf is no longer agpl and has to be removed

ddvk avatar Nov 03 '25 12:11 ddvk

Hmm, if that's the case, we might be better off trying to fix it using current go-cairo implementation. I can take that task on the library side. Then see if updating the package here fixes the issue.

Moreover, I'll address the comments made by co-pilot.

joagonca avatar Nov 03 '25 13:11 joagonca

I've bumped the rmc-go library to v1.1.1 which already supports multi-size multi-page PDF rendering using go-cairo. I think I've also addressed the co-pilot comments.

joagonca avatar Nov 03 '25 15:11 joagonca

A quick look seems to indicate that this also will support CRDT IDs needed for the handwriting search branch I'm working on 👍

rmitchellscott avatar Nov 10 '25 19:11 rmitchellscott

Do we have an estimate on how long is left on this PR before it gets merged? I am so thrilled for this ticket I check several times a week.

ericchianti avatar Dec 19 '25 04:12 ericchianti