Direct Conversion
The direct mode offers a quick and efficient approach to PDF generation by sending a POST request with URLs, HTML content, or template ID and JSON data. The API responds immediately with the raw PDF, ready for download or display. This endpoint is ideal for workflows requiring real-time PDF generation, such as document rendering in web applications or dashboards, delivering the PDF directly in the response.
Endpoint Details
Method: POST
https://api.pdfbolt.com/v1/direct
Example
- Request
- Response
Example for generating a PDF directly from a URL:
{
"url": "https://example.com"
}
The response is a raw PDF file, ready for saving or further processing.

Body Parameters
In this section, you will find only the parameters specific to the /direct endpoint. To view the list of common parameters shared across all endpoints, please refer to the Conversion Parameters section.
isEncoded
Type: boolean
Required: No
Default Value: false
Details:
The isEncoded parameter determines the format of the PDF data returned in the response:
- When set to
true, the response contains the PDF data encoded in Base64 format, and the content type istext/plain. - When set to
falseor omitted, the response contains the raw PDF binary data, and the content type isapplication/pdf.
Usage:
{
"url": "https://example.com",
"isEncoded": true
}
Be aware that Base64 encoding increases the size of the data by approximately 33%, which can impact data transfer times and storage requirements.
Response
The format of the response depends on the value of the isEncoded parameter. See the details below:
| Value | Response Format | Content Type |
|---|---|---|
true | Base64-encoded PDF | text/plain |
false | Raw PDF binary | application/pdf |