HTML to PDF
Submit HTML for a report or a public URL, then save the PDF returned by the API.
Input and coverage: HTML inputs support up to 5 MiB; URL inputs up to 2048 characters. Keep access to your input and save the returned PDF.
Example request
Replace YOUR_APPKEY with your own API key. This request uses the normal API endpoint.
curl --fail-with-body 'https://api.gugudata.io/v1/imagerecognition/html2pdf?appkey=YOUR_APPKEY' \
--request POST \
--header 'Content-Type: application/json' \
--data '{"type": "html", "content": "<html><body><h1>Quarterly report</h1><p>Prepared for review.</p></body></html>", "landscape": 0}'View sample Demo response
This is a fixed Demo sample, shortened for readability. It is not the response to your example request. Your results depend on the input and dataset. File URLs are temporary and have been removed.
{
"dataStatus": {
"statusCode": 200,
"status": "SUCCESS",
"statusDescription": "successfully",
"dataTotalCount": 1
},
"data": {
"pdfPath": "<temporary PDF URL>"
}
}