I want to get report output as pdf using the REST API. I have written some code to get it using Spring RestTemplate class. But Im getting an error in invoking the service. Here is the code that i have written public ResponseEntity runReport (HttpServletRequest request , String reportUri , String parameters , String outFormat) throws IOException { Spring | Home Generating and downloading PDF using spring boot and Thymeleaf In this blog, we will be generating a pdf document using the thymeleaf template. For this, we need to add these dependencies in our pom.xml or build.gradle file. In this blog, we will be using gradle dependencies. spring-boot-starter-thymeleaf flying-saucer-pdf Follow these steps : Spring MVC ResponseEntity enables control not only over the body of the HTTP Response but also the header and the response status code. Following this approach, you need to define the return type of the method as ResponseEntity
© 2025 Created by PML. Powered by
You need to be a member of Personal Mechatronics Lab to add comments!
Join Personal Mechatronics Lab