With more than a decade of experience in software engineering, I share the best practices and solutions you can apply to your problems in the space of headless browsers. You can also find me on Twitter and LinkedIn
To take full-page screenshots with Puppeteer or Playwright, you only need to set the fullPage
parameter to `true` when taking a screenshot. But there are so many caveats that you may assume by default that the full-page screenshot feature does not work in Puppeteer.
Puppeteer, by default, supports only four formats for taking screenshots or rendering HTML: PNG, JPEG, WebP, and PDF.
If you want to take a screenshot of the site or render HTML in a different format, like GIF, JP2, TIFF, AVIF, HEIF, or SVG, there are many workarounds on how to do it.