API de génération de PDF à partir de HTML/CSS, propulsée par Puppeteer. Un seul endpoint, une clé secrète, un format de page au choix.
curl -X POST https://pdf.direktschool.com/api/pdf \
-H "Authorization: Bearer <API_SECRET_KEY>" \
-H "Content-Type: application/json" \
-d '{"html":"<h1>Bonjour</h1>","format":"A4"}' \
--output document.pdf
| Champ | Type | Détails |
|---|---|---|
html | string | Obligatoire — contenu HTML du document |
css | string | Optionnel — CSS injecté dans le document |
format | string | Optionnel — A0–A6, Letter, Legal, Tabloid, Ledger (défaut A4) |
landscape | boolean | Optionnel — orientation paysage (défaut false) |
margin | string | objet | Optionnel — marge de page, ex. "3mm" ou {"top":"3mm",...} |