About this endpoint
What it does
Uploads a PDF and stamps a header and/or footer onto it, then streams the modified PDF back as the response. The request body must include the source PDF file and at least one header source and one footer source for each slot, using text or PNG image inputs as defined below.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Source PDF file to stamp. |
| footer | String | No | Footer text. Alias of footer_text; if both text and image are provided for the footer slot, text wins. |
| header | String | No | Header text. Alias of header_text; if both text and image are provided for the header slot, text wins. |
| font_size | Number | No | Shared fallback for header_font_size / footer_font_size. Minimum 8, maximum 24. |
| footer_text | String | No | Alias of footer. Required if footer_image is not given. Wins over footer_image if both are present. |
| header_text | String | No | Alias of header. Required if header_image is not given. Wins over header_image if both are present. |
| font_opacity | Number | No | Opacity for text rendering. Minimum 0, maximum 1. |
| footer_image | String | No | PNG footer image. Required if footer_text is not given. |
| header_image | String | No | PNG header image. Required if header_text is not given. |
| footer_opacity | Number | No | Footer opacity. Default is 1. Minimum 0, maximum 1. |
| header_opacity | Number | No | Header opacity. Default is 1. Falls back to font_opacity when header_text is set, otherwise 1. Minimum 0, maximum 1. |
| footer_alignment | ENUM | No | Footer alignment. Allowed values: left, right, center. Default is center. |
| footer_font_size | Number | No | Footer text size. Default is 12. Minimum 8, maximum 24. |
| header_alignment | ENUM | No | Header alignment. Allowed values: left, right, center. Default is center. |
| header_font_size | Number | No | Header text size. Default is 12. Falls back to font_size if unset. Minimum 8, maximum 24. |
| footer_image_size | Number | No | Footer image size scale. Default is 0.1. Minimum 0.1, maximum 1. |
| header_image_size | Number | No | Header image size scale. Default is 0.1. Minimum 0.1, maximum 1. |
Response
Returns a binary file stream containing the stamped PDF. The success response is a single binary string, not a JSON object.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| string | String | Yes | Binary PDF output streamed back by the endpoint. |