Thursday, 11 May 2017

PdfKit doc.pipe() error

So in my code i have the following lines that work fine :

var newPdf = new pdfKit();
newPdf.pipe(fs.createWrtieStream('output.pdf'));  

A file called output.pdf is created and stuff written into it! But the followings dosen't create a file :

var newPdf = new pdfKit();
var myString = 'output.pdf'
newPdf.pipe(fs.createWriteStream(myString));  

Any idea why?



via Filippo Bosco

No comments:

Post a Comment