HTML To Any
Learn how to capture website screenshots and generate images or PDFs using JigsawStack’s HTML To Any API
Overview
The HTML To Any API allows you to capture high-quality screenshots of any webpage or HTML content. This powerful tool enables you to generate images in various formats (PNG, JPEG, WebP) or PDF documents with extensive customization options for different use cases.
- High-quality website captures with customizable resolution
- Support for multiple output formats (PNG, JPEG, WebP, PDF)
- Full-page screenshots that capture entire scrollable content
- Dark mode rendering support
- Advanced options for PDF generation
API Endpoint
Quick Start
Optimizing Performance
For faster screenshot generation:
Capturing Single-Page Applications
For SPAs or dynamic content that requires extra time to load:
Common Questions
What’s the difference between capturing by URL vs. HTML?
When you provide a URL, the API loads the complete webpage including all external resources like JavaScript, CSS, and images. When you provide HTML directly, you need to ensure all resources are either embedded or accessible via absolute URLs.
How long does the API wait for a page to load?
By default, the API waits for the window.load event with a timeout of 15 seconds. You can customize this behavior using the goto_options parameter to wait for different events like domcontentloaded or networkidle0.