标签: javascript html css node.js pdf
我想创建一个简单的端点,我将简单的css + html作为可查看的pdf返回。在Node.js
类似的东西:
response.headers('Content-Type', 'application/pdf'); let output = '<h1>some html</h1>' let bufferData = Buffer.from(output, 'utf8'); response.body = bufferData