document.body.innerHTML = ...
is faster thanpage.setContent(...)
.- There is no difference between
document.body.innerHTML
anddocument.body.replaceWith(newBodyElement)
.
- There is no difference between
- In the context of PDF generation, older version pupeteer
1.11.0
is pretty fast. The latest version5.2.1
is very slow.