@GetMapping
public ResponseEntity<ByteArrayResource> exportRequests() {
ByteArrayResource resource = new ByteArrayResource(convertToPDF());
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + "test" + ".pdf")
.contentLength(resource.contentLength())
.contentType(MediaType.parseMediaType("application/pdf"))
.body(resource);
}