API Overview
HTML2PDF Converter API
Easily convert any public HTML webpage into a high-quality PDF document using a simple REST API.
This API accepts a URL via JSON payload (POST) and returns a fully rendered PDF (application/pdf) generated using a headless Chromium engine. It supports modern web technologies including JavaScript frameworks (Vue, React), CSS Grid, Flexbox, custom fonts, and background styling.
Perfect for automated document workflows and SaaS platforms 🚀
🔧 How It Works
- Send a POST request with a JSON body containing the target URL.
- The API renders the webpage using a secure headless browser.
- The rendered output is converted into a PDF.
- The API returns a downloadable PDF file (application/pdf).
📥 Request
Method: POST Content-Type: application/json
Example Payload
{
"url": "https://example.com"
}
📤 Response
- Content-Type: application/pdf
- Filename: Unix timestamp (e.g., 1719054321.pdf)
- Fully rendered PDF output
- Ready for direct download
✨ Features
- Full JavaScript rendering support
- Supports modern CSS (Flexbox, Grid, Shadows, Backgrounds)
- High-resolution A4 PDF output
- Print background enabled
- No watermark
- Production-ready infrastructure
- Scalable for high-volume usage
🔒 Security
- Only public URLs allowed
- Isolated rendering environment
- Secure execution sandbox
🎯 Ideal Use Cases
- Resume / CV generators
- HR and recruitment platforms
- Invoice & billing systems
- Automated reporting dashboards
- Webpage archiving
- SaaS tools with export-to-PDF feature