[英]Is it possible to embed an iframe using html-pdf on Express?
我有以下文件作为 html 仅用于测试目的:
<div id="pageHeader">
<h1>Page Header</h1>
<p>test</p>
</div>
<div>
<iframe
title="something"
src="https://geoportal.implanchihuahua.org/sigmun/apps/webappviewer/index.html?id=92971c77b4b047f89d35b08791a83db9"
width='100%'
height='100%'>
</iframe>
这个问题可能看起来有点奇怪和明显,但我想试一试。 是否可以使用库 html-pdf 嵌入 iframe 组件并将其作为图像导出到 pdf 文件?
我在端点上制作 PDF 的示例方法如下:
let baseFile = fs.readFileSync('./src/templates/test.html', 'utf8');
console.log(baseFile);
pdf.create(baseFile).toFile('./test.pdf', (err, res) => {
if (err){
console.log(err);
}else {
console.log(res);
}
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.