Export a catalogue record as a PDF (offline backup + printable copy) #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
Curators need a durable, human-readable copy of a catalogue record — both as an
offline backup (store on HDD/DVD/external media, independent of the running
system) and as a printable sheet for a physical archive. A PDF fits both: it's
self-contained, archival, printable, and doesn't require the app to be online.
Scope (v1)
/objects/:id) as a PDF.backups, ZIP-of-PDFs, embedded images/media (no media subsystem yet).
What the PDF should contain
app_namefrom config — never hardcoded) + objectnumber + visibility.
current_location, current_owner, recorder, recording_date.
term/authorityvalues resolved to human-readable labels (not raw UUIDs)and
localized_textrendered per language.Open design questions (resolve in brainstorm before implementing)
GET /api/admin/objects/{id}/export.pdf— server-rendered, deterministic, scriptable for batch backup, reachable from a
future CLI) vs. frontend (print-styled detail view → browser "Save as PDF" — zero
new deps, simpler, but less deterministic/automatable). The backup use-case
leans backend; print is satisfied by either. Likely: backend endpoint + a
frontend "Export PDF" button that hits it.
typst(lib; modern typography),genpdf/printpdf(pure-Rust, lower-level), or HTML→PDF via headless Chromium(heavy runtime dep — probably avoid given self-host is a first-class target).
ViewInternal).Acceptance (v1)
containing the core + resolved flexible fields, with product name + object number.
via a stable endpoint.
Follow-ups (separate issues when this lands)
Filed at the user's request — a PDF export feature for record backup + physical printing.