Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
In my application users need to be able to export a PDF file containing all the data of a form they have filled out. I have a template Word file which is programmatically filled after pulling the form from the database. I will then convert this to a PDF. Finally I need to send this to the user so they can download it.
Currently I am stuck on how to implement the download of an arbitrary dynamic file. I assume that creating a DataListAction plugin is the way to go, as this allows a "Generate PDF" button on each form-row. I've also written a test DataListAction, which correctly displays name, etc, and can be put onto a list.
It is here though that I am stuck. If I have an arbitrary file (or arbitrary string of bytes), how do I output this to the user so that they can download this?
I need it to function like a standard web-download from the user's point-of-view.
It seems the only method I have available to use in the plugin source is the executeAction(), which returns a DataListActionResult. I am not sure though how to tell Joget to initiate a file-download (or if it is even possible using this plugin).
Any help would be greatly appreciated!