Save As Dialog Box Not Coming

Total Post:1

Points:7
 1176  View(s)
Ratings:
Rate this:

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



Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!