Control PDF generation in document package downloads
Added a generatePdf query parameter to the Download Document Package endpoint and wired it into the dashboard.
We’ve made the document package download more flexible around including an autogenerated PDF.
What changed
- generatePdf query parameter: The
download-packageendpoint now accepts ageneratePdfquery parameter with three options:never,always, orwhen_no_pdf_attachment. - Smarter PDF inclusion: When set to
when_no_pdf_attachment, the API only generatesauto-generated.pdfif there isn’t already a PDF attachment on the document. - Dashboard behaviour: Package downloads triggered from the transmitted documents table and detail page request
generatePdf=always, so the PDF is always included there.
This gives you more control over when PDFs are generated and avoids unnecessary duplicates when a document already includes its own PDF.