how to get download pdf file with using table custom action

Hi Team,

I have a requirement like to get download PDF file with using table custom action.
I am using apache pdf box to create pdf file. Please advice me how can i implement.

Let me know if cuba platform already providing the pdf api internally.

Regards,
Nagendra.

Hi,

with the Report engine in CUBA you can create reports that have the output format of PDF. You can programatically call the creation of a report, look here for more details.

Through the usage of a full template possibility, there is very little need to programatically create PDF files. Instead just create a report with a template you want (like Word, excel, HTML etc.) and the report engine will inject the data into the template and replace the variables with the data.

Be aware that the report part is not included in the open source part of the platform.

But you can also just do your PDF generation in a manual way without the report engine. In this case CUBA acts like any other java application.

Bye
Mario

Hi Mario,

I am able to generate the PDF file using apache pdfbox. My question is how the pdf will get download when clicking custom action button in table.

Regards,
Nagendra.

Hi,

You can find information about downloading files in the documentation.

Regards,
Gleb