[英]how to convert pdf array buffer to pdf file using nodejs
以下是pdf緩沖區。 我想將緩沖區轉換為 pdf 文件。
data = {
"file": {
"type": "Buffer",
"data": [
102,
24,
62
]
},
}
res.send( data );
您可以使用res.sendFile並使用標頭發送一些數據。
// res.sendFile(path [, options] [, fn])
let options = {
headers: {
'TheDataYouWantToSend': Date.now() // for example a timestamp
}
}
req.sendFile(absolutePathToFile, options)
我希望這有幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.