Docs · Formats · v0.2.1

PDFs, arXiv, web articles, EPUB books, and source.

Every document type enters the same GPU-scrolled reader with OKLab theme ink, continuous scroll, link hints, cross-stack search, and layered annotations.

pdfium-renderSandboxed Typsttectonicv0.2.1View .md

01 · Front Doors

One command per source type.

open anything
hoja document.pdf                       # local PDF, mixed page sizes preservedhoja 1706.03762                         # arXiv ID, cached locally, resumes pagehoja https://example.com/deck.pdf       # remote PDF validated by %PDF- headerhoja https://example.com/post           # web article -> Markdown -> sandboxed Typsthoja book.epub                          # EPUB unpacked in memory -> Typsthoja secret.pdf --password 'hunter2'    # encrypted PDF (or HOJA_PDF_PASSWORD)hoja notes.typ --watch                  # Typst source, live reloadhoja notes.md --watch                   # Markdown with $...$ and $$...$$ mathhoja paper.tex --watch                  # LaTeX via tectonic
SourceEngineSafeguards & behavior
Local PDF / arXivpdfium-renderBounded 8-page LRU cache + 3x double-buffered GPU strips; 500-page books stay flat
Remote PDF URLpdfium-renderSniffed by %PDF- magic bytes, 512 MiB cap, query tokens stripped from titles and logs
Web article URLdefuddle / Rust HTML + TypstUses defuddle when on PATH, else built-in pure-Rust extractor; set HOJA_DEFUDDLE=0 to force built-in
EPUB bookIn-memory ZIP + TypstRejects zip bombs, zip-slip paths, XML entity expansion, and DRM-protected files before rendering
Encrypted PDFpdfium-renderPassword read from --password or HOJA_PDF_PASSWORD in memory only; never saved to disk
.md / .tex / .typTypst (cmarker+mitex) / tectonicCompiles in place on save with --watch without losing your scroll position

02 · Sandboxed Typst Pipeline

Safe web and EPUB rendering.

Web articles and EPUB books compile inside a scratch directory with typst --root, with raw Typst injection disabled (raw-typst: false) and math routed through a MiTeX guard. Compiled PDFs cache under ~/Library/Caches/hoja/url and ~/Library/Caches/hoja/epub (or ~/.cache/hoja/ on Linux) alongside a title sidecar so the stack switcher shows readable titles.

Optional tools
Install typst for web articles, EPUB books, .typ files, and Markdown math; install tectonic for .tex files. Missing compilers only disable those source front doors, never PDF reading. Check status with hoja doctor.

03 · Scope

When not to use hoja.

hoja is read-only toward source documents. It intentionally rejects DRM-protected EPUBs and does not fill interactive PDF forms, apply digital signatures, or mutate embedded PDF annotations in place.