So what I exactly want to do is, Generate a pdf for an order in my order management system.
I am using node.js as the backend and flutter as the front end.
What I had in my mind is: Generate the pdf and store it on the server, return the link to the pdf to the flutter app and then download the pdf, but I don't want to store the pdf on the server, so when my flutter app calls the generatePdf endpoint using GET method, how can I send the pdf directly? Do I need to use res.download ? I am new to node.js and cannot understand the flow for downloading the file. Also, how do I need to change the request in my flutter app for the same?
Note: I am using PDFMake to generate the pdf.