Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

PDF Generation API

❖ Feature Description

Generate PDF files from HTML content or HTML templates.

❖ Request Mode

Sync Request ✓
Process the request inline and return the result file when it completes. Best for small files and immediate feedback.
Async Request
Accept the task first, then use taskId to query status and download the result. Best for large files and batch jobs.

▎Call Flow

1Upload the file
2Call the synchronous endpoint
3Download the result

HTML to PDF

POSThttp://localhost:8080/api/v1/process/pdf/generation/html-to-pdf

❖ Request Parameters

Authentication credential sent in the header: x-api-key. Sign in to the Dashboard API management page to view the API Access Key for the current deployment.

Body Parameters multipart/form-data

No file selected
HTML file. Use this or request.html or request.htmlUrl.
PDF request JSON string. See HTML to PDF request parameters for details.
🔗Request Example
curl --request POST \
  --url http://localhost:8080/api/v1/process/pdf/generation/html-to-pdf \
  --header 'x-api-key: YOUR API-KEY' \
  --form [email protected]
✓Response Example
200 OK
Processed successfully. Returns the result file stream.

Template to PDF

POSThttp://localhost:8080/api/v1/process/pdf/generation/template-to-pdf

❖ Request Parameters

Authentication credential sent in the header: x-api-key. Sign in to the Dashboard API management page to view the API Access Key for the current deployment.

Body Parameters multipart/form-data

No file selected
HTML template file. Use this or request.template.
No file selected
JSON data file. Use this or request.data.
PDF request JSON string. See Template to PDF request parameters for details.
🔗Request Example
curl --request POST \
  --url http://localhost:8080/api/v1/process/pdf/generation/template-to-pdf \
  --header 'x-api-key: YOUR API-KEY' \
  --form [email protected]
✓Response Example
200 OK
Processed successfully. Returns the result file stream.