1 year ago

Pdf download functionality in node js

Posted 1 year ago by coderathore

router.get('/demo',function (req,res){ async function getinvoicelist(){

var chunks = []; var options = { method: 'GET', url: '',

request(options, function (error, response, body) {



We are getting this when we console the body . We want when we hit this route then pdf file download in browser with data

%PDF-1.4 %���� 3 0 obj <</Length 1438/Filter/FlateDecode>>stream x��Y�r�6��+�Ɍ3S�xXڭ�h���IM���STB�n>�_�/p~!�^<H��N�xti���}��T�, ��&k��g���xU|*҂�Gk�JPSH#13�װ�).�?�����`�������/��

Please sign in or create an account to participate in this conversation.