I created a pdf file based on the thymeleaf template i'm actually using the template resolver, flying saucer, to write the file on the output stream but since i can't access the front in order to define the content of the recap which would be generated every now and then when the client needs to, i thought it would be better to generate the pdf file on the server side. So my question is:
Is there a way to get the output stream where my data is written and convert it in order to write on the fly so it won't be created in the local storage
Here's a part of my business logic:
os = new FileOutputStream(pdf);
ITextRenderer renderer = new ITextRenderer();
renderer.layout();
renderer.createPDF(os);
i use this in my controller and i use attachement content attribut in the response entity
other then that i'm open to any suggestions thanks in advance