How in a java project can a HTML form upon submission be converted to PDF and then attached to a email.
Springboot & Thymeleaf are the frameworks in use. The form looks like this:
http://jsfiddle.net/x1hphsvb/5563/
Controller so far:
@org.springframework.stereotype.Controller
@EnableAutoConfiguration
public class Controller {
@RequestMapping("/")
String home() {
return "static/index.html";
}
public static void main(String[] args) throws Exception {
SpringApplication.run(Controller.class, args);
}
}
I have looked at this tutorial and searched for a way to do it with PDF Box without success.
Should I take the data in the back end and insert it into a HTML template or insert the data into a PDF template.
The PDF form should also have the collapsability similar to the HTML.