Save As Pdf
POST/api/customreport/custompdfexport
Tier: Internal — subject to change without notice.
Renders a free-form data model to PDF through a named server-side HTML template.
Unlike the other three PDF actions on this controller, CustomPdfExportDto.TemplateName
names a server file-system path rather than an org-scoped PrintTemplate id. The
resolved path is validated to stay within the application's templates directory and to
end in .html before it is read (B11-5) — this closes what was previously an
unguarded path-traversal / arbitrary-file-read vector. Response compression is disabled
on this action (client compatibility workaround for gzip'd file downloads).
Request
Responses
- 200
- 400
The rendered PDF (application/octet-stream, attachment {ReportName}.pdf).
CustomPdfExportDto.TemplateName is missing, does not resolve within the
templates directory, or does not end in .html (InvalidReference, field
TemplateName); or rendering otherwise failed (generic OperationFailed —
the underlying exception is logged server-side, not echoed to the caller).