About this endpoint
What it does
Captures a publicly accessible webpage URL and returns the generated PDF as a binary download. The request body supplies the page URL, while optional query parameters control the PDF output settings.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| margin | Number | No | Page margin in the range 0 to 1. Default: 0.1. |
| output | String | No | Output filename. Example: output.pdf. |
| landscape | Boolean | No | false by default. When true, generates the PDF in landscape orientation. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| url | String | Yes | Public webpage URL to capture. Must be a valid URI. Example: https://assets.apyhub.com/samples/sample.html. |
Response
Returns a binary file containing the generated PDF. The success response is a raw String value with binary format rather than a JSON object.