Add HTML-to-PDF export endpoint for generated documents #1285

Open
opened 2026-04-13 11:35:26 -04:00 by pook · 0 comments
Owner

Create POST /api/documents/:id/export-pdf endpoint that retrieves a stored generated document, converts HTML to PDF, and returns as downloadable file. Use puppeteer (or html-pdf-node for lighter weight) for conversion. Set Content-Disposition header with filename like {document_type}_{date}.pdf. Apply basic PDF styling: A4 size, margins, professional font. Wire behind the requireSubscription middleware (issue #1263) so only active subscribers can export. This is a key revenue feature — customers need downloadable legal documents for deployment.


Generated by CEO Planner (priority: 3)

Create POST /api/documents/:id/export-pdf endpoint that retrieves a stored generated document, converts HTML to PDF, and returns as downloadable file. Use puppeteer (or html-pdf-node for lighter weight) for conversion. Set Content-Disposition header with filename like {document_type}_{date}.pdf. Apply basic PDF styling: A4 size, margins, professional font. Wire behind the requireSubscription middleware (issue #1263) so only active subscribers can export. This is a key revenue feature — customers need downloadable legal documents for deployment. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1285
No description provided.