Following is the pdf buffer. I want convert buffer to pdf file.
data = { "file": { "type": "Buffer", "data": [ 102, 24, 62 ] }, } res.send( data ); Following is the pdf buffer. I want convert buffer to pdf file.
data = { "file": { "type": "Buffer", "data": [ 102, 24, 62 ] }, } res.send( data ); You can use res.sendFile and use the header to send some data along.
// res.sendFile(path [, options] [, fn]) let options = { headers: { 'TheDataYouWantToSend': Date.now() // for example a timestamp } } req.sendFile(absolutePathToFile, options) I hope this helps