hi, i was trying generate a pdf from html file, here basically i have two html files in one folder, both these html files should be converted to pdf, one pdf file is getting generated, but the other one not, same logic used and i have used html-pdf node package
hi, i was trying generate a pdf from html file, here basically i have two html files in one folder, both these html files should be converted to pdf, one pdf file is getting generated, but the other one not, same logic used and i have used html-pdf node package
`router.get('/template/:ptId',(req,
res) =>{ Invoice.find({ptId:req.params.ptId}, function(err, alldetails){ if (err){ res.status(400).json(err) }else { res.status(200).render('template', {alldetails:alldetails}, function(err, html){ pdf.create(html, options).toFile('../public/pdf/invoice.pdf',function(err, res){ if(err){ console.log(err); }else { console.log(res) } }) res.send(html) }) } });`})``