Outliny allows you to generate beautiful, production-ready PDFs directly from raw HTML content. This is perfect if you already have a custom HTML layout or generate your document content dynamically.
What is HTML-to-PDF Generation?
Instead of using a pre-designed template, you provide your own HTML code (optionally with inline CSS), and Outliny will render it into a clean, printable PDF file.
It's fast, flexible, and gives you full control over layout and styling.
Endpoint
POST /api/v1/render/pdf/html
Authentication
Like all API requests, you must include your API Key:
Authorization: Bearer YOUR_API_KEY
Request Body
Field
Type
Required
Description
html
string
Optional
The full HTML content you want to render.
filename
string
Optional
Suggested filename for the generated PDF.
output_type
string
Optional
pdf (default) or base64.
page_settings
string
Optional
Customize page size, margins, orientation, etc.
Example Request
POST https://api.outliny.com/api/v1/render/pdf/html
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"html": "<html><body><h1>Invoice #12345</h1><p>Thank you for your business!</p></body></html>",
"filename": "invoice-12345.pdf",
"page_settings": {
"format": "A4",
"margin": "20mm",
"orientation": "portrait"
}
}
OR
curl -X POST "https://outliny.com/api/getHtml" -H "Content-Type: application/json" -d
'{
"templateID": "67eb70b13db38972948a2597",
"jsonData": {}
}'