Use case · Contracts
The contract PDF API
Contracts are the document type where layout genuinely matters. Clause numbering has to survive a page break, signature blocks must not orphan onto a page of their own, and both parties need the same rendering a year from now.
Send the agreement HTML your app already assembles from a template and merge data. CSS paged-media rules do the hard part — page-break-inside, running headers, counters — and the result is identical every time.
01How it works
Clause numbering that holds
CSS counters number sections automatically, so inserting a clause renumbers the rest instead of breaking the document.
Signature blocks stay whole
page-break-inside: avoid keeps a signature block on one page, which is the detail reviewers notice first.
Archive the exact bytes
Send an Idempotency-Key and a re-request returns the identical document — useful when a contract must be reproducible for audit.
02One request
curl https://rendral.com/api/v1/pdf \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: contract-8842-v1" \
-d '{ "html": "<article class="agreement">…</article>",
"options": { "format": "A4", "pageNumbers": true,
"margin": { "top": "28mm", "bottom": "24mm" } } }' \
-o contract-8842.pdfFrequently asked
Can I keep clause numbering across page breaks?
Yes. Use CSS counters for numbering and page-break-inside: avoid on clause blocks; Chrome's paged-media support handles both, so numbering never restarts mid-document.
Do you support headers and footers on every page?
Yes — supply header and footer HTML, or set pageNumbers: true for a centred page counter. Both repeat automatically on every page.
Is this an e-signature service?
No. It renders the document; signing and audit trails belong to your e-signature provider. Many teams generate the PDF here and hand it to that provider.
Will the same contract render identically later?
Yes. Send an Idempotency-Key and a repeat request returns the original bytes rather than re-rendering, so an archived agreement stays byte-identical.
Related
Packing slips PDF API
Generate packing slips and pick lists as PDFs from HTML.
Compare vs PDFShift
How PDFShift and Rendral differ on pricing, features, and setup.
PDFs in Node.js
A step-by-step guide to generating PDFs from Node.js.
A free tier, five endpoints, and SDKs for Node and Python.