I am using pdfkit 0.6.1 in a node.js express 3 project.
I want to send the PDF as an HTTP Response instead of saving it on the server.
The example at http://pdfkit.org/docs/getting_started.html says to use:
# HTTP response doc.pipe fs.createWriteStream(res) # add stuff to PDF here # finalize the PDF and end the stream doc.end()
However I am getting an error which says: "500 TypeError: path must be a string"