Files
Stirling-PDF/frontend/editor
Connor Yoh 1ce4f81b0c Portal: make the draft-agreement download work without server rendering
The "Agreement" download at the sign step hit the Java backend's
/agreement/document/pdf, which renders the agreement markdown via
WeasyPrint. That runtime isn't present in every environment (local dev,
any deploy without it), so the endpoint 404s and the download silently
failed. Worse, the failure set the shared `error` flag, so the buyer saw
"Could not record your signature" — an unrelated, alarming message.

- Separate the download error from the sign error (own state + own copy).
- On any download failure, fall back to the browser's print-to-PDF on the
  already-rendered agreement body, via a hidden iframe so it isn't
  popup-blocked. Production still serves the branded WeasyPrint PDF; the
  fallback only triggers when that path is unavailable. The printed draft
  carries the same "Draft — for review" notice.
2026-07-14 17:18:41 +01:00
..
2026-07-11 12:48:53 +01:00