⚠ Deprecated endpoint. The direct /htmltopdf service is no longer exposed publicly. Use POST /panel/api/pdf/generate instead — a Bearer token and active licence are required. See the interactive API reference for full details.

HTML to PDF Documentation

Home

Converts HTML content to PDF (or image) using wkhtmltopdf.

Endpoint: /panel/api/pdf/generate

Accepts a JSON body. The html field must be base64-encoded.

Single Page

{ "html": "base64_encode(<html><body>...</body></html>)", "globalOptions": {} }

Additional Parameters

Response

{ "success": true, "data": "base64_encoded_pdf_bytes", "message": "Generated successfully" }

Displaying the PDF in a browser

<iframe src="data:application/pdf;base64,{data}"></iframe>
Note: Ensure the content in data is properly base64-decoded before embedding.