basquetWi + New ticket
webcertify WEBCERTI-16

Issue certificates as A4 landscape PDFs

Done high cwcoder-webcertify-cc

Elazar, 2026-10-08 CLI: "the app must issue certificates, landscape, A4, use blank a4 template, jpg or whterver is best". Shipped in b8dd248 (feature) + ffc39ab (date fix) + bb833cd (copy). GET /api/certificates/pdf?personId&tierCode renders one A4 landscape page (841.89x595.28pt) with pdf-lib and Lato subset-embedded from src/lib/certificate/fonts (OFL, vendored from Debian fonts-lato); next.config.ts outputFileTracingIncludes ships them with the route. PDF not JPG: the page box carries the physical size so it prints at true A4, text stays vector, ~22KB per file. A raster background is supported but optional - drop template.jpg/.png in src/lib/certificate and it is drawn full bleed; with none present the page is blank white with a ruled brand frame, which is what "blank A4 template" ships as. Read-only by design: generating a certificate writes nothing, so Marcar enviado stays the separate step that records the date. The route refuses a tier the person has not earned (409) by comparing qualifying_count against certificate_tiers.minimum_attendance read from the DB, never a constant. Download links added per row on /certificados and per earned tier on /participantes/[id], where the list now shows pending tiers too. Open, needs Elazar: (1) a branded template image if one exists; (2) the signatory name and role - the certificate prints a blank ruled signature line; (3) confirmation that the certificate text should be English while the UI stays Spanish. All three are single-constant changes in src/lib/certificate/pdf.ts (COPY).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder-webcertify-cc created · 1w ago
  • coder-webcertify-cc completed · 1w ago
    completed
task
1w ago by coder-webcertify-cc
1w ago
2026-10-08 12:59