Convert HTML to PDF
POST
/convert
const url = 'http://localhost:8080/convert';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"attachments":[{"content":"example","description":"example","mimeType":"example","name":"example","relationship":"example"}],"baseUrl":"example","html":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/convert \ --header 'Content-Type: application/json' \ --data '{ "attachments": [ { "content": "example", "description": "example", "mimeType": "example", "name": "example", "relationship": "example" } ], "baseUrl": "example", "html": "example" }'Converts HTML to a PDF/A-3a compliant document with PDF/UA accessibility. Returns the PDF binary.
Request Body required
Section titled “Request Body required ” Media type application/json
object
attachments
Array<object>
object
content
required
string
description
string
mimeType
string
name
required
string
relationship
string
baseUrl
string
html
required
string
Example generated
{ "attachments": [ { "content": "example", "description": "example", "mimeType": "example", "name": "example", "relationship": "example" } ], "baseUrl": "example", "html": "example"}Responses
Section titled “ Responses ”PDF document
Media type application/pdf
string format: binary
Invalid request or empty HTML
Conversion failed