Convert HTML to PDF
POST /pdf/convert
POST
/pdf/convert
Returns a PDF file from HTML content or URL. Supports custom page size, margins, and orientation.
Request Body required
Section titled “Request Body required ”object
html
HTML content to convert (required if url not provided)
string
url
URL to render as PDF (required if html not provided)
string
format
Page format: A4, Letter, Legal, Tabloid (default: A4)
string
orientation
Page orientation: portrait or landscape (default: portrait)
string
margin
Margins in CSS format, e.g. ‘10mm’ or ‘10mm 20mm’ (default: none)
string
print_background
Print background graphics (default: true)
boolean
tailwind
Include Tailwind CSS support via CDN (default: true)
boolean
Responses
Section titled “ Responses ”string format: binary
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties