rmfakecloud icon indicating copy to clipboard operation
rmfakecloud copied to clipboard

Removes the `unipdf` and `rmapi` library dependencies

Open joagonca opened this issue 1 month ago • 2 comments

Summary

Removes unipdf and rmapi dependencies (licensing issues) and replaces with Cairo-based PDF rendering.

Key Changes

  • Removed: unipdf, juruen/rmapi
  • Added: go-cairo, pdfcpu
  • New: Internal encoding/rm and archive packages (copied from AGPL rmapi fork)
  • Renamed: RenderRmapi()RenderPDF()

Requirements

Cairo must be installed for building and running:

  • Debian/Ubuntu: apt-get install libcairo2-dev pkg-config
  • macOS: brew install cairo pkg-config
  • Docker: Now uses debian:bookworm-slim base (includes Cairo runtime)

Breaking Changes

  • Requires CGO (no more CGO_ENABLED=0 builds)
  • Docker base image changed from scratch to debian:bookworm-slim

All reMarkable PDF rendering features preserved (annotations, highlighters, v3/v5 formats, etc).

joagonca avatar Nov 27 '25 09:11 joagonca

@ddvk I've done a bit of copying/pasting, and I've made the build process similar/equal to the one suggested in the v6_rmc branch.

Though I don't have access to v5 content to test. That's why I've opened a draft PR. Any suggestions?

joagonca avatar Nov 27 '25 09:11 joagonca

Isn't rmapi also AGPL 3.0?

rmitchellscott avatar Dec 08 '25 17:12 rmitchellscott

@ddvk Is this OK? If so, I could bump the v6_rmc @ #392 branch to accommodate these changes. Currently there are a few conflicts due to the rendering and the modules.

joagonca avatar Dec 17 '25 12:12 joagonca