| name | remarkable-render-pdf |
| description | Download a document from a reMarkable device/cloud via remarquee (rmapi-backed) and render it to an annotated PDF via `remarquee rmdoc render-v6`/`render-legacy`, optionally extracting the last N pages into a smaller PDF. Use when asked to export/render/download a reMarkable notebook/journal/document to PDF (full doc or page subset). |
reMarkable Render to PDF
IMPORTANT: Minimize tool calls
- Never run
remarquee status as a pre-check. Just run the command you need.
- Never run
remarquee cloud account before operations. Upload and cloud commands now auto-retry with reauth on 401/403. Pass --non-interactive and let the command handle auth automatically. If you see NOTE: auth expired, re-authenticating and retrying... in stderr, just let it proceed.
- Use
cloud search instead of cloud ls + cloud ls when you know the document name — it's one call instead of two.
Preconditions
- For page extraction:
qpdf and pdfinfo
Workflow
1) Locate the document on reMarkable cloud
Search by name (often easiest):
remarquee cloud search "journal #001" --match name --limit 50 --compact --non-interactive
If you already know the folder, list it:
remarquee cloud ls /Journals --long --non-interactive
Pick the remote path you want (example):
/Journals/#001 - 2025-12 - 2026-01-19
2) Download as .rmdoc
outdir="$HOME/remarkable_exports/$(date +%F)"
mkdir -p "$outdir"
remarquee cloud get "/Journals/#001 - 2025-12 - 2026-01-19" --out-dir "$outdir" --non-interactive
3) Inspect to choose renderer (V6 vs legacy)
remarquee rmdoc inspect "$outdir/#001 - 2025-12 - 2026-01-19.rmdoc"
- If
schema=cPages, render with render-v6
- Otherwise try
render-legacy
4) Render to PDF (annotated)
remarquee rmdoc render-v6 \
"$outdir/#001 - 2025-12 - 2026-01-19.rmdoc" \
--out "$outdir/#001 - 2025-12 - 2026-01-19-annotated.pdf" \
--force
Legacy fallback:
remarquee rmdoc render-legacy "$outdir/#001 - 2025-12 - 2026-01-19.rmdoc" --out "$outdir/#001 - 2025-12 - 2026-01-19-annotated.pdf" --force
5) Extract the last N pages (optional)
Example: last 2 pages
pdf="$outdir/#001 - 2025-12 - 2026-01-19-annotated.pdf"
pages="$(pdfinfo "$pdf" | rg '^Pages:' | awk '{print $2}')"
start=$((pages-2+1))
qpdf --empty --pages "$pdf" "$start-$pages" -- "$outdir/#001 - 2025-12 - 2026-01-19-last-2-pages.pdf"
Scripted workflow
Use scripts/render_remote_to_pdf.py when you want a single deterministic command (download → render → optionally extract):
python3 scripts/render_remote_to_pdf.py \
--remote-path "/Journals/#001 - 2025-12 - 2026-01-19" \
--out-dir "$HOME/remarkable_exports/$(date +%F)" \
--extract-last 2 \
--force
It prints the generated paths on success.
If cloud tokens are missing and you need to authenticate, add --interactive.