Removes the `unipdf` and `rmapi` library dependencies
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/rmandarchivepackages (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-slimbase (includes Cairo runtime)
Breaking Changes
- Requires CGO (no more
CGO_ENABLED=0builds) - Docker base image changed from
scratchtodebian:bookworm-slim
All reMarkable PDF rendering features preserved (annotations, highlighters, v3/v5 formats, etc).
@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?
Isn't rmapi also AGPL 3.0?
@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.