I have the following file as a html just for testing purposes:
<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>
The question might seem kind of weird and obvious, but I wanted to give it a try. Is it possible to embed an iframe component and export it as an image to a pdf file using the library html-pdf?
My sample method to make the PDF on an endpoint is the following:
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);
}
})