How can I call a backend method of a java model from the htl frontend?
Hello, what happens is that I have a template that is for products and the information is brought from AiO, but what I want to do now is that in the template we want to implement a button that when clicked, create a pdf and download it.
For it in the java model of the template I have created a method that contains the structure and design of the pdf using the library IText7, since, the pdf will be different to the design of the template.
My question here is, how can I do so that in the frontend of the htl when I click on the download button I call the java backend to the method that creates the pdf and download it from the template model?