Hello,
I am using the same code as mentioned above. I am able to write PDF file in PDF folder but it never open save as dialog box. I want to download PDF file on client machine. Following is the code i am using :
doc.pipe( fs.createWriteStream(path.resolve(".")+'/PDF/'+filename+'.pdf') );
res.download(path.resolve(".")+'/PDF/'+filename+'.pdf'); // it download this file
console.log(path.resolve(".")+'/PDF/'+filename+'.pdf');
doc.end(); // document end by the end method
Please reply ASAP
Can you answer this question?
Answer
0 Answers