Certificate generation
What's on an Open Gauge calibration certificate, and how to fetch it.
Saving a calibration best-effort generates an A4 PDF certificate in the same request — if generation fails for some reason, the calibration record is still saved; you can regenerate the certificate later.
Certificates are not hand-built PDFs — they're rendered from a LaTeX template (a .tex
file with placeholders) compiled to PDF by Tectonic,
a small self-contained LaTeX engine. Every organization gets a working certificate with zero
configuration (the built-in default template), and an admin can upload a custom template to
change the layout, wording, or branding without any code changes — see
Certificate templates.
Contents
- Letterhead — the organization's logo (if set, see Data model & concepts) and name.
- Header — QR code and certificate number.
- Asset info — the asset and channel calibrated.
- Traceability — the procedure followed, the reference standard used (internal calibrations), and the recorded environmental conditions.
- Results — the fitted coefficients and equation, the regression statistics table (see Curve fitting), the itemized uncertainty budget table (see The uncertainty budget), and the statement of conformity (see Decision rules).
- Dataset — the raw point table and a fit chart.
- Signature — the performing user's signature image, if they've set one (see Signatures), cryptographically bound to their account and independently verifiable. Shown when the calibration is tied to a real user account — the "Performed by" field on the calibration wizard defaults to the logged-in user (linking the record to their account) but can be switched to free text for an external performer, in which case there's no account to look a signature up on. As a fallback (mainly for calibrations recorded before this linking existed), if the record isn't linked but the typed "Performed by" name exactly matches an active user's display name, that user's signature is still used.
This signature image is a picture on the page, not a verifiable signature of the document — every generated certificate PDF is separately and additionally digitally signed (PAdES, embedded in the PDF itself by any PDF viewer with signature support) after compilation, regardless of which template produced it. See Certificate digital signatures.
The uncertainty section prints a full-sentence GUM §7.2.4-style statement — value, coverage factor, basis (normal vs. t-distribution), confidence level, and the valid range the uncertainty applies over — adapted for a calibration function rather than a single measurement result, since that's what Open Gauge certifies.
What's deliberately not on it
Per ISO/IEC 17025 §7.8.4.3, a calibration certificate must not print a calibration-interval
recommendation unless that's been explicitly agreed with the customer. The built-in default
template doesn't print a due date or any interval language — that header cell shows the
calibration's location instead (see
ISO/IEC 17025 compliance §7.8.4.3 for
the history; this was a bug prior to v3.2.1). due_date is still available in the template
context for a custom uploaded template that wants to print it. This is separate from the
recommended interval Open Gauge computes for its own health
scoring — that number never appears on a certificate, only in the app's own UI.
Which template is used
By default, resolution order is first match wins:
- The calibrated asset's organization's active default template (via the asset's location — see Data model & concepts).
- The performing user's organization's active default template, if the asset has no location.
- The global default template, if one has been uploaded.
- The built-in template shipped with Open Gauge — always available, no configuration needed.
The Download Certificate button on a calibration's detail panel has a dropdown next to it listing every template available to that calibration (its organization's templates plus any global ones) — picking one downloads a certificate rendered with that specific template instead of the resolved default, without affecting the canonical stored certificate described below.
Fetching a certificate
GET /calibrations/{id}/certificate returns a 1-hour presigned MinIO URL to the certificate
generated when the calibration was saved (generating it on demand if it's missing) — this is
the canonical, cached certificate for the calibration.
GET /calibrations/{id}/certificate/download (optionally with a ?template_id= query param)
always renders a fresh PDF and streams it directly, without touching the cached certificate —
this is what powers the template picker above, and what the UI uses for every download click,
so what you see reflects the calibration's current data and the chosen template exactly. It
requires the calibration to have results (a fitted equation or manually-entered coefficients);
otherwise it returns 400.
GET /calibrations/{id}/certificate-templates lists the templates available for that
calibration's asset (its organization's templates plus global ones), for building a template
picker like the one described above.
See Calibrations in the API Reference.