[英]Dynamic PDF with html-pdf npm
When creating a Dynamic PDF in node using html-pdf, the content became cut at the end of pages.使用 html-pdf 在节点中创建动态 PDF 时,内容在页面末尾被剪切。
In html, added <div id="pageFooter"></div>
在 html 中,添加
<div id="pageFooter"></div>
Code that used to create PDF is用于创建 PDF 的代码是
pdf.create(finalstr, {
format: "A3",
"footer": {
"height": "10mm",
}
})
Is there any solution?有什么解决办法吗?
Is it possible to create PDF from HTML using PhantomJs?是否可以使用 PhantomJs 从 HTML 创建 PDF?
try:尝试:
pdf.create(finalstr, {
format: "A3",
"footer": {
"height": "10mm",
},
"border": {
"bottom": "10mm"
}
})
试试这个,你可以改变页眉和页脚的高度..
pdf.create(finalstr, { format: "A4", "header": { "height": "20mm" } "footer": { "height": "20mm", } })
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.