Hello people, I am creating a pdf using suitelet, ...
# suitescript
t
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?
I think I faced this earlier but it was easier with SS1.0.
f
What do your headers look like in your PDF Template ... do they start with something like :
Copy code
<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
Other than that, it could be settings in your browser (e.g. extensions, cache) or security software. So assuming you have not tried a different browser, that is likely worth a try.