I generate some html text and then translate it to pdf using html-pdf package. Then I wanna put it into archive created by jsZip. In every example they use .toStream((err, stream) => stream.pipe(res))
but I cant find how to put it into archive.
I have tried zip.file('newPDF.pdf', pdf.create(html).toStream())
but it doesn't work