如何解决我正在尝试使用 node-html-pdf npm 包将 HTML 转换为 pdf问题是pdf没有解释数学符号
var fs = require("fs");
var pdf = require("html-pdf");
var html = fs.readFileSync("./new.html","ascii",(err,data) => {
if (err) return console.log(err);
console.log(data);
});
var options = { format: "Letter" };
pdf.create(html,options).toStream(function (err,stream) {
stream.pipe(fs.createWriteStream("./foo(2).pdf"));
});
This image is the screenshot of the HTML file.
This image is the screenshot of the output PDF file. 这里存在平方根符号,但 +- 符号消失了,对齐也消失了。有没有办法将 HTML 转换为可打印的 pdf?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。