This task can be performed using Doppio.sh
PDF and Screenshot for Modern Softwares
Best product for this task

Doppio.sh
dev-tools
Fully managed API to generate and privately store documents and screenshots using top rendering technology. (HTML to PDF API / HTML to Screenshot API)

What to expect from an ideal product
- Turn any webpage into a high-quality screenshot with just a few lines of code.
- Save screenshots securely and access them whenever you need.
- Seamlessly handle dynamic content to ensure accurate captures.
- Use top-notch rendering technology for sharp and clear images.
- Streamline your workflow by integrating effortlessly with your existing setup.