![](/img/trans.png)
[英]Node Js NPM PDFkit and Voilab pdf table, pdfkit paragraph error afer generate table
[英]open pdf after generate pdfkit/node webkit
我正在使用 Nw.js 开发跨平台应用程序。 我正在尝试生成 PDF 并打开它,但它不起作用! 我没有错误!
var PDFDocument = require('pdfkit');
var fs = require('fs');
var appContent = document.getElementsByClassName('response');
doc = new PDFDocument;
doc.pipe(fs.createWriteStream('output.pdf'));
doc.fontSize(15);
doc.text(appContent[0].innerHTML);
doc.end();
你有什么想法 ?
谢谢
该文件会自动保存在 Temp 文件夹中。
只需致电:
window.open('output.pdf');
就是这样
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.