Hi, i want to syncronize a callback, how is the best ways to do it.here is my code:http://pastie.org/p/3VEVgZaN630SKHquyzAnnLi need to syncronize the callback(toBuffer) with the function htmlToPdfraw code :function htmlToPdf(html){let options = { format: 'A4',base:'file://' + __dirname + '../public/' };let resultado = null;pdf.create(html,options).toBuffer((err,buffer)=>{if(!err){resultado = buffer;console.log(resultado) } })return resultado}
Submitted June 22, 2020 at 05:36PM by walace47
No comments:
Post a Comment