POST
/
api
/
pdf
Generate PDF from HTML
curl --request POST \
  --url https://peedief.com/api/pdf \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "html": "<string>",
  "fileName": "document.pdf",
  "options": {
    "format": "A4",
    "landscape": false,
    "printBackground": true,
    "margin": {
      "top": "20mm",
      "bottom": "20mm",
      "left": "15mm",
      "right": "15mm"
    },
    "scale": 1
  }
}'
{
  "success": true,
  "downloadUrl": "<string>",
  "fileName": "<string>",
  "fileSize": 123
}

Authorizations

x-api-key
string
header
required

Body

application/json

Response

PDF generated successfully

The response is of type object.