POSTConvert HTML
https://html-render.dataandapis.com/v1/v1/convert
Cuerpo de la petición
{
"html": "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>",
"format": "pdf",
"options": {
"format": "A4",
"printBackground": true,
"margin": {
"top": "20px",
"right": "20px",
"bottom": "20px",
"left": "20px"
}
}
}Petición de ejemplo
curl -X POST "https://html-render.dataandapis.com/v1/v1/convert" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "html": "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>", "format": "pdf", "options": { "format": "A4", "printBackground": true, "margin": { "top": "20px", "right": "20px", "bottom": "20px", "left": "20px" } } }'https://dataandapis.com/images/html-render-example.webp




