Hello people,
I am creating a pdf using suitelet, when I am printing it it's displaying in the browser which I exactly need. But when I download it using the download button the file is not downloaded as it is the
scriptlet.nl file and not pdf.
To download the pdf, I have to click the print button instead.
Currently I have tried these options
1. renderPdf directly on browser using response.renderPDF
2. render.xmlToPdf and then using writeFile with inline true
3. adding Content-type and Content-Disposition headers with attachment and filename
4. I have been able to download file directly but not using the download button from pdf viewer.
Do you have any suggestions on this?