pdfr - HTML to PDF over HTTP (powered by htmltopdf)
POST /render
Option A (JSON):
{"html": "
Hello
",
"landscape": false,
"margin": 36,
"font": "Georgia",
"filename": "document.pdf",
"flatten_css": false,
"base_url": "https://example.com",
"selector": "#main-content"}
Option B (raw body):
request body = the HTML document; use query params for options:
?landscape=true&margin=36&font=Georgia
Response: application/pdf
Options (JSON fields, or query params for raw bodies; JSON fields win):
landscape=true|1 force A4 landscape
margin= page margin in PDF points
font= embed a TrueType font by file path or family name
filename= download filename (default document.pdf)
flatten_css=true (?flatten=true)
inline targets into