HTML to PDF
Convert HTML markup or any URL to a pixel-perfect PDF document.
Free
Error:
Converting to PDF...

Features

Full page rendering
Renders JavaScript and CSS just like a browser would.
A4 / Letter formats
Output in standard print formats with configurable margins.
URL conversion
Convert any public URL to PDF with full asset loading.
Background printing
Preserves background colors and images in the output PDF.
Instant download
PDF is ready for download in seconds.
REST API
Integrate into any app via our developer API.
cURL
JavaScript
Python
curl -X POST https://bastiantechnologies.com/api/html-to-pdf/convert \ -H "X-API-Key: YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"html":"<h1>Hello</h1>"}'
const res = await fetch('/api/html-to-pdf/convert', { method: 'POST', headers: { 'X-API-Key': 'YOUR_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ html: '<h1>Hello</h1>' }) }); const { jobId } = await res.json();
import requests r = requests.post('https://bastiantechnologies.com/api/html-to-pdf/convert', headers={'X-API-Key': 'YOUR_KEY'}, json={'html': '<h1>Hello</h1>'})